You have a list of different numbers. A subset is any group of them that you pick. You can pick none of them, some of them, or all of them. The order inside a subset does not matter.
Return all possible subsets of nums. Do not repeat a subset. Return the answer in any order.
Examples
Example 1:
Input: nums = [4,5]
Output: [[],[4],[5],[4,5]]
Explanation: The subsets are: nothing, only 4, only 5, and both.
Example 2:
Input: nums = [2,3,6]
Output: [[],[2],[3],[2,3],[6],[2,6],[3,6],[2,3,6]]
Explanation: With 3 numbers there are 2 x 2 x 2 = 8 subsets, from the empty one to the full one.