public int minCostRec(int cost[][], int m, int n, int x, int y){
        if(x > m || y > n){
            return Integer.MAX_VALUE;
        }
        if(x == m && y == n){
            return cost[m][n];
        }
        
        int t1 = minCostRec(cost, m , n, x+1, y);
        int t2 = minCostRec(cost, m , n, x+1, y+1);
        int t3 = minCostRec(cost, m , n, x, y+1);
        
        return cost[x][y] + min(t1,t2,t3);
    }
http://www.geeksforgeeks.org/dynamic-programming-set-6-min-cost-path/
src/com/interview/dynamic/MinCostPath.java