Skip to content

Files

Latest commit

3741ffe · Dec 29, 2017

History

History

subsets

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Dec 29, 2017
Dec 29, 2017
Dec 29, 2017

78. Subsets

Description | Discuss | Solution

Description

Given a set of distinct integers, nums, return all possible subsets (the power set).

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],
  []
]