Skip to content

Latest commit

 

History

History
19 lines (16 loc) · 267 Bytes

File metadata and controls

19 lines (16 loc) · 267 Bytes

Given a set of distinct integers, nums, return all possible subsets.

Note: The solution set must not contain duplicate subsets.

For example,

If nums = [1,2,3], a solution is:

[
  [3],
  [1],
  [2],
  [1,2,3],
  [1,3],
  [2,3],
  [1,2],
  []
]