Permutation Sequence

Solution Code

Time Complexity

O(n^2)

Space Complexity

O(n)