Skip to content

Commit ca162fd

Browse files
committed
solve : unique path
1 parent a812314 commit ca162fd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

unique-paths/samthekorean.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# TC : O(n)
2+
# SC : O(1)
3+
class Solution:
4+
def uniquePaths(self, m: int, n: int) -> int:
5+
return math.comb(m + n - 2, n - 1)

0 commit comments

Comments
 (0)