Question d’entretien chez American Express

Generate all permutations of a string.