Question d’entretien chez Amazon

Write a program to get all permutations of a string