Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions 多语言解法代码/solution_code.md
Original file line number Diff line number Diff line change
Expand Up @@ -5980,7 +5980,7 @@ class Solution {
track.add(candidates[i]);
sum += candidates[i];
// 递归遍历下一层回溯树
backtrack(candidates, i, target, sum);
backtrack(candidates, i + 1, target, sum);
// 撤销选择 candidates[i]
sum -= candidates[i];
track.removeLast();
Expand Down Expand Up @@ -6019,7 +6019,7 @@ var combinationSum = function(candidates, target) {
track.push(candidates[i]);
sum += candidates[i];
// 递归遍历下一层回溯树
backtrack(candidates, i, target, sum);
backtrack(candidates, i + 1, target, sum);
// 撤销选择 candidates[i]
sum -= candidates[i];
track.pop();
Expand Down Expand Up @@ -13243,7 +13243,7 @@ public:
track.push_back(candidates[i]);
sum += candidates[i];
// 递归遍历下一层回溯树
backtrack(candidates, i, target, sum);
backtrack(candidates, i + 1, target, sum);
// 撤销选择 candidates[i]
sum -= candidates[i];
track.pop_back();
Expand Down Expand Up @@ -13327,7 +13327,7 @@ class Solution {
track.add(candidates[i]);
sum += candidates[i];
// 递归遍历下一层回溯树
backtrack(candidates, i, target, sum);
backtrack(candidates, i + 1, target, sum);
// 撤销选择 candidates[i]
sum -= candidates[i];
track.removeLast();
Expand Down Expand Up @@ -72131,4 +72131,4 @@ class Solution:
return s[n:] + s[:n]
```

https://leetcode.cn/problems/zuo-xuan-zhuan-zi-fu-chuan-lcof 的多语言解法👆
https://leetcode.cn/problems/zuo-xuan-zhuan-zi-fu-chuan-lcof 的多语言解法👆