Driver Code
public static void main ( String [ ] args ) { Integer range [ ] [ ] = { { 1 , 4 } , { 4 , 4 } , { 2 , 2 } , { 3 , 4 } , { 1 , 1 } } ; int N = range . length ; System . out . print ( maxRanges ( range , N ) ) ; } }