Skip to content

Commit 67744a4

Browse files
authored
Merge pull request #15 from iamAntimPal/Leetcode-75
Leetcode 75
2 parents 393ad81 + 0a8f03c commit 67744a4

File tree

2 files changed

+470
-0
lines changed

2 files changed

+470
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class Solution:
2+
def uniquePaths(self, m: int, n: int) -> int:
3+
f = [[0] * n for _ in range(m)]
4+
f[0][0] = 1
5+
for i in range(m):
6+
for j in range(n):
7+
if i:
8+
f[i][j] += f[i - 1][j]
9+
if j:
10+
f[i][j] += f[i][j - 1]
11+
return f[-1][-1]

0 commit comments

Comments
 (0)