【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 =
相關文章
相關標籤/搜索