You are given a list of numbers nums. Some numbers may repeat. Return all the possible subsets of nums (a subset can be empty, or the whole list).
Two subsets with the same numbers are the same subset, even if you pick the equal numbers from different places. Do not repeat a subset. The order inside a subset does not matter. Return the answer in any order.
Examples
Example 1:
Input: nums = [3,3,5]
Output: [[],[3],[3,3],[5],[3,5],[3,3,5]]
Explanation: The subset [3] appears only once, even though there are two 3s.
Example 2:
Input: nums = [4,4,4]
Output: [[],[4],[4,4],[4,4,4]]
Explanation: Only the number of 4s in the subset changes: zero, one, two or three.