We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3d4fd8 commit 28fb96aCopy full SHA for 28fb96a
unique-paths/printjin-gmailcom.py
@@ -0,0 +1,7 @@
1
+class Solution:
2
+ def uniquePaths(self, m, n):
3
+ dp = [[1] * n for _ in range(m)]
4
+ for i in range(1, m):
5
+ for j in range(1, n):
6
+ dp[i][j] = dp[i - 1][j] + dp[i][j - 1]
7
+ return dp[m - 1][n - 1]
0 commit comments