Example 1
- Input
- nums = [1,2,2]
- Output
- [[],[1],[1,2],[1,2,2],[2],[2,2]]
There are two choices for the number of 1 values and three choices for the number of 2 values, giving six distinct subsets. The two positions containing 2 do not create two separate [2] answers, but both may be included in [2,2].