Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit eced8fc

Browse files
Update Solution.py
1 parent 6aeabf0 commit eced8fc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎Algorithms/Medium/62_UniquePaths/Solution.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ def uniquePaths(self, m: int, n: int) -> int:
77

88
for i in range(n - 2, -1, -1):
99
new_row[i] = new_row[i + 1] + bottom_row[i]
10+
1011
bottom_row = new_row
1112

12-
return bottom_row[0]
13+
return bottom_row[0]

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /