Generate All Permutations Leetcode 46