public static void main(String args[]){
        Pair p = new Pair(5,7);
        Pair p1 = new Pair(2,3);
        Pair p2 = new Pair(2,6);
        Pair p3 = new Pair(9,11);
        Pair p4 = new Pair(8,10);
        Pair p5 = new Pair(11,14);
        
        Pair[] arr = {p,p1,p2,p3,p4,p5};
        MaximumLengthChainPair mlcp = new MaximumLengthChainPair();
        int r = mlcp.maxLength(arr);
        System.out.print(r);
    }
http://www.geeksforgeeks.org/dynamic-programming-set-20-maximum-length-chain-of-pairs/
src/com/interview/dynamic/MaximumLengthChainPair.java