Category: Backtracking
Difficulty: intermediate
Description: Generate all permutations
Time Complexity: O(n!)
Space Complexity: O(n)