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 676bbc8

Browse files
update
1 parent 361277d commit 676bbc8

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

‎Rocket.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ void quick_sort(int a[], int low, int high){
865865
```
866866

867867
5. 堆排序:将待排序序列构造成一个大顶堆,此时,整个序列的最大值就是堆顶的根节点。将其与末尾元素进行交换,此时末尾就为最大值。然后将剩余n-1个元素重新构造成一个堆,这样会得到n个元素的次小值。如此反复执行,便能得到一个有序序列了。
868-
```java
868+
```
869869
public class Test {
870870
871871
public void sort(int[] arr) {

‎src/回溯法/q40_组合总和2/Solution.java‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,15 @@ public void helper(int[] candidates, int target, int start, LinkedList<Integer>
3030
if (!set.contains(candidates[i]) && target >= candidates[i]) {
3131
stack.push(candidates[i]);
3232
helper(candidates, target - candidates[i], i + 1, stack, res);
33+
System.out.println(stack + "before");
3334
stack.pop();
35+
System.out.println(stack + "after");
3436
set.add(candidates[i]);
3537
}
3638
}
3739
}
40+
41+
public static void main(String[] args) {
42+
new Solution().combinationSum2(new int[]{10, 1, 2, 7, 6, 1, 5}, 8);
43+
}
3844
}

0 commit comments

Comments
(0)

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