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 eafcfca

Browse files
committed
add 90
1 parent f9d4c1c commit eafcfca

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

‎problems/0090.subsets-ii/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
# 0090.subsets-ii
3+
4+
```text
5+
90. 子集 II
6+
7+
给你一个整数数组 nums ,其中可能包含重复元素,请你返回该数组所有可能的子集(幂集)。
8+
9+
解集 不能 包含重复的子集。返回的解集中,子集可以按 任意顺序 排列。
10+
11+
12+
13+
示例 1:
14+
15+
输入:nums = [1,2,2]
16+
输出:[[],[1],[1,2],[1,2,2],[2],[2,2]]
17+
示例 2:
18+
19+
输入:nums = [0]
20+
输出:[[],[0]]
21+
22+
23+
提示:
24+
25+
1 <= nums.length <= 10
26+
-10 <= nums[i] <= 10
27+
28+
来源:力扣(LeetCode)
29+
链接:https://leetcode-cn.com/problems/subsets-ii
30+
著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。
31+
```

‎problems/0090.subsets-ii/run.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package ii
2+
3+
func Run() {
4+
5+
}
6+
7+
func subsetsWithDup(nums []int) [][]int {
8+
res := make([][]int, 0)
9+
10+
return res
11+
}

‎problems/0090.subsets-ii/run_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
package ii
3+
4+
import "testing"
5+
6+
func TestRun(t *testing.T) {
7+
Run()
8+
}

0 commit comments

Comments
(0)

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