Driver Code
public static void Main ( String [ ] args ) { Interval [ ] arr1 = { new Interval ( 1 , 3 ) , new Interval ( 7 , 9 ) , new Interval ( 4 , 6 ) , new Interval ( 10 , 13 ) } ; int n1 = arr1 . Length ; if ( isIntersect ( arr1 , n1 ) ) Console . Write ( " Yes STRNEWLINE " ) ; else Console . Write ( " No STRNEWLINE " ) ; Interval [ ] arr2 = { new Interval ( 6 , 8 ) , new Interval ( 1 , 3 ) , new Interval ( 2 , 4 ) , new Interval ( 4 , 7 ) } ; int n2 = arr2 . Length ; if ( isIntersect ( arr2 , n2 ) ) Console . Write ( " Yes STRNEWLINE " ) ; else Console . Write ( " No STRNEWLINE " ) ; } }