LeetCode 64. Minimum Path Sum

题目

简单动态规划

class Solution {
public:
    int dp[1005][1005];
    int minPathSum(vector>& grid) {
        
        int n = grid.size();
        int m = grid[0].size();
        dp[0][0]=grid[0][0];
        for(int i=0;i

你可能感兴趣的:(LeetCode 64. Minimum Path Sum)