Subsets: return all subsets of a set.
Asked in the Round 2 stage. Use recursive/backtracking first, then iterative if helpful.
subsets(nums)
Given a list of distinct integers nums, return all possible subsets, including the empty subset and nums itself. The order of subsets does not matter.
nums, a list of distinct integersdef subsets(nums):