Skip to content

Commit 5d5c177

Browse files
committed
Time: 0 ms (100%), Space: 17.7 MB (88.75%) - LeetHub
1 parent b3cc872 commit 5d5c177

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
class Solution:
2+
def uniquePaths(self, m: int, n: int) -> int:
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[-1][-1]

0 commit comments

Comments
 (0)