public static void main(String args[]){
        CuttingRod cr =new CuttingRod();
        int[] price = {3,5,8,9,10,20,22,25};
        long t1 = System.currentTimeMillis();
        int r = cr.recursiveMaxValue(price,8);
        long t2 = System.currentTimeMillis();
        System.out.println(r);
        System.out.println(t2 - t1);
    }
http://www.geeksforgeeks.org/dynamic-programming-set-13-cutting-a-rod/
src/com/interview/dynamic/CuttingRod.java