Given an integer array nums of unique elements, return all possible subsets (the power set). The solution set must not contain duplicate subsets. Return the solution in any order.
Example 1
Input: nums = [1,2,3]
Output: [[],[1],[2],[1,2],[3],[1,3],[2,3],[1,2,3]]
Explanation: Each of the 3 elements is either in or out of a subset, giving 2³ = 8 subsets, from the empty set to [1,2,3].
Example 2
Input: nums = [0]
Output: [[],[0]]
Explanation: A one-element array has two subsets: the empty set and [0].
Example 3
Input: nums = [1,2]
Output: [[],[1],[2],[1,2]]
Explanation: Two elements give 2² = 4 subsets: [], [1], [2] and [1,2].
At every index, we face a binary decision: *include* `nums[i]` or *skip* it. That naturally forms a recursion tree of depth `n` with `2ⁿ` leaves — each leaf is one subset.
Run checks all cases above. Submit evaluates all test cases.