Capital One interview question

The coding challenge dealt with generating permutations.