Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Subsets (Medium 78)

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

Solution:

Click here Use backtracking, and add temp to result every recursive call. Use one element, then backtrack, then unuse it. Pass index to next recursive call. O(n2^n) time, O (n!) space.



Installation

Run make to run python and Swift files.