Pregunta de entrevista de Capital One

The coding challenge dealt with generating permutations.