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 7f5ce0a

Browse files
Update 0216.组合总和III.md
1 parent 5cd1eec commit 7f5ce0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎problems/0216.组合总和III.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ class Solution:
367367

368368
def backtracking(self, targetSum, k, currentSum, startIndex, path, result):
369369
if currentSum > targetSum: # 剪枝操作
370-
return # 如果path的长度等于k但currentSum不等于targetSum,则直接返回
370+
return # 如果currentSum已经超过targetSum,则直接返回
371371
if len(path) == k:
372372
if currentSum == targetSum:
373373
result.append(path[:])

0 commit comments

Comments
(0)

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