Skip to content

Commit

Permalink
Update 0077. 组合.md
Browse files Browse the repository at this point in the history
  • Loading branch information
itcharge committed Aug 9, 2021
1 parent a6b3e24 commit 63c3d70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Solutions/0077. 组合.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Solution:
if len(self.path) == k:
self.res.append(self.path[:])
return
for i in range(start_index, n + 1):
for i in range(start_index, n - (k - len(self.path)) + 2):
self.path.append(i)
self.backtrack(n, k, i + 1)
self.path.pop()
Expand Down

0 comments on commit 63c3d70

Please sign in to comment.