← 返回 bytedance 的题目列表Subsets II
类型:online_judge
Given an integer array nums that may contain duplicates, return all possible subsets (the power set). The solution set must not contain duplicate subsets, and subsets can be returned in any order.
Example
Input: [1,2,2]
Output: [[],[1],[2],[1,2],[2,2],[1,2,2]] (any order)
Constraints
0 <= len(nums) <= 20
nums[i] fits in 32-bit integer
Example
Input
1 2 2
Output
6