Driver code
public static void main ( String [ ] args ) { int intervals [ ] [ ] = { { 1 , 6 } , { 2 , 8 } , { 3 , 10 } , { 5 , 8 } } ; int N = intervals . length ; findIntersection ( intervals , N ) ; } }