90. Subsets II
Practice Subsets II for free on NudgeCode: Medium, Backtracking pattern. Write it in Python or JavaScript, run the tests in your browser, and ask for a hint when you are stuck.
nums may contain duplicates. Return every distinct subset of it, including the empty set. Two subsets that hold the same values count as the same subset. The subsets, and the values inside each, can be in any order.
Example
nums = [1,2,2] -> [[],[1],[1,2],[1,2,2],[2],[2,2]]
Constraints
- 1 <= nums.length <= 10
- -10 <= nums[i] <= 10