Permutations II

Solution Code

Time Complexity

O(N N!)

Space Complexity

O(N)