【Leetcode】 64. Minimum Path Sum

求最小路径和 方法1 DP法 递推方程很容易写 dp[i][j] = min(dp[i-1][j], dp[i][j-1]) + grid[i][j] class Solution(object): def minPathSum(self, grid): """ :type grid: List[List[int]] :rtype: int """ dp =
相关文章
相关标签/搜索