Driver program to test above function
public static void main ( String [ ] args ) { Pair arr [ ] = new Pair [ ] { new Pair ( 5 , 24 ) , new Pair ( 15 , 25 ) , new Pair ( 27 , 40 ) , new Pair ( 50 , 60 ) } ; System . out . println ( "Length of maximum size chain is " + maxChainLength ( arr , arr . length ) ) ; } }