mirror of
https://github.com/halfrost/LeetCode-Go.git
synced 2025-07-05 16:36:41 +08:00
更新题解
This commit is contained in:
@ -31,4 +31,5 @@ Given a set of **distinct** integers, *nums*, return all possible subsets (th
|
||||
## 解题思路
|
||||
|
||||
- 找出一个集合中的所有子集,空集也算是子集。且数组中的数字不会出现重复。用 DFS 暴力枚举即可。
|
||||
- 这一题和第 90 题,第 491 题类似,可以一起解答和复习。
|
||||
|
||||
|
@ -29,4 +29,5 @@ Given a collection of integers that might contain duplicates, ***nums***, retur
|
||||
|
||||
- 这一题是第 78 题的加强版,比第 78 题多了一个条件,数组中的数字会出现重复。
|
||||
- 解题方法依旧是 DFS,需要在回溯的过程中加上一些判断。
|
||||
- 这一题和第 78 题,第 491 题类似,可以一起解答和复习。
|
||||
|
||||
|
Reference in New Issue
Block a user