def minPathSum(self, grid: List[List[int]]) -> int:
        row = len(grid)
        col = len(grid[0])
        dp = [[0]*col for i in range(row)]
        minPath = 0
        return self.findPath(grid, row-1, col-1, dp)