Given an array nums of distinct integers, return every possible subset (the power set) in any order.
nums
nums = [1,2,3]
[[],[1],[2],[1,2],[3],[1,3],[2,3],[1,2,3]]
nums = [0]
[[],[0]]
1 <= nums.length <= 10 All integers in `nums` are unique.
Topics
Implement subsets in the editor and return the answer — printing it is never graded.
subsets
Problem 79 of 1146 in the arena