Movatterモバイル変換


[0]ホーム

URL:


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

Commit14d773b

Browse files
Update
1 parentc91672d commit14d773b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

‎README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@
149149
*[回溯算法:排列问题(二)](https://mp.weixin.qq.com/s/9L8h3WqRP_h8LLWNT34YlA)
150150
*[本周小结!(回溯算法系列三)](https://mp.weixin.qq.com/s/tLkt9PSo42X60w8i94ViiA)
151151

152+
152153
(持续更新中....)
153154

154155
#LeetCode 刷题攻略

‎problems/0040.组合总和II.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,13 @@ candidates 中的每个数字在每个组合中只能使用一次。
5656

5757
回看一下题目,元素在同一个组合内是可以重复的,怎么重复都没事,但两个组合不能相同。
5858

59+
5960
**所以我们要去重的是同一树层上的“使用过”,同一树枝上的都是一个组合里的元素,不用去重**
6061

6162
为了理解去重我们来举一个例子,candidates =[1, 1, 2], target = 3,(方便起见candidates已经排序了)
6263

64+
**强调一下,树层去重的话,需要对数组排序!**
65+
6366
选择过程树形结构如图所示:
6467

6568
<imgsrc='../pics/40.组合总和II.png'width=600> </img></div>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp