public int cutRodToMinimizeCost(int [] markings, int total) {
        int T[][] = new int[total+1][total+1];
        for(int i = 0 ; i < T.length; i++) {
            for(int j=0; j < T[i].length ; j++) {
                T[i][j] = -1;
            }
        }
        return cutRodToMinimizeCost(markings, 0, total, T);
    }
Date 07/20/2015
@author Tushar Roy

Given a rod with markings. Cut the rod along markings but reduce the cost of cutting.
Cost if cutting is proportional to the length of rod being cut.

Solve is using top down dynamic programming. Memoize minimum cost of cutting between marking
start to end. To calculate the value try all markings b/w start to end.
src/com/interview/dynamic/CutRodToMinimizeCost.java