// duynotes.blogspot.com class Solution { public int minPathSum(int[][] grid) { int m = grid.length; int n = grid[0].length; int [][] dp = new int[m][n]; dp[0][0] = grid[0][0]; for (int i=1; i