Skip to content

Commit

Permalink
Merge pull request #2532 from keaising/patch-1
Browse files Browse the repository at this point in the history
解决 `0063.不同路径II.md` 示例代码缩进错误
  • Loading branch information
youngyangyang04 committed May 14, 2024
2 parents 3f2d0c4 + 62cfba1 commit ba12ff6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion problems/0063.不同路径II.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public:
int uniquePathsWithObstacles(vector<vector<int>>& obstacleGrid) {
int m = obstacleGrid.size();
int n = obstacleGrid[0].size();
if (obstacleGrid[m - 1][n - 1] == 1 || obstacleGrid[0][0] == 1) //如果在起点或终点出现了障碍,直接返回0
if (obstacleGrid[m - 1][n - 1] == 1 || obstacleGrid[0][0] == 1) //如果在起点或终点出现了障碍,直接返回0
return 0;
vector<vector<int>> dp(m, vector<int>(n, 0));
for (int i = 0; i < m && obstacleGrid[i][0] == 0; i++) dp[i][0] = 1;
Expand Down

0 comments on commit ba12ff6

Please sign in to comment.