Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Permutations (Medium 46)

Given a collection of distinct integers, return all possible permutations.

Solution:

Click here Use backtracking and pick one number at a time to fill temp array. Once temp array is same size as permutation, add it to result. Each time choose next number, and check if it was used with set. O(n!) time, O(n) space.



Installation

Run make to run python and Swift files.