mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-12 21:50:49 +08:00
Merge pull request #2490 from shuaigewudi/master
修改 0039.组合总和.md:修改python代码错误,将continue改为break
This commit is contained in:
@ -311,7 +311,7 @@ class Solution:
|
|||||||
|
|
||||||
for i in range(startIndex, len(candidates)):
|
for i in range(startIndex, len(candidates)):
|
||||||
if total + candidates[i] > target:
|
if total + candidates[i] > target:
|
||||||
continue
|
break
|
||||||
total += candidates[i]
|
total += candidates[i]
|
||||||
path.append(candidates[i])
|
path.append(candidates[i])
|
||||||
self.backtracking(candidates, target, total, i, path, result)
|
self.backtracking(candidates, target, total, i, path, result)
|
||||||
|
Reference in New Issue
Block a user