Skip to content

Commit 19b62b4

Browse files
correct typo
1 parent 8ee888d commit 19b62b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

MEDIUM/src/medium/UniquePaths.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public int uniquePaths_merged_for_loop(int m, int n) {
3636
int[][] dp = new int[m][n];
3737
for(int i = 0; i < m; i++){
3838
for(int j = 0; j < n; j++){
39-
if(i == 0 || j == 0) dp[i][j] = 0;
39+
if(i == 0 || j == 0) dp[i][j] = 1;
4040
else dp[i][j] = dp[i-1][j] + dp[i][j-1];
4141
}
4242
}

0 commit comments

Comments
 (0)