Pregunta de entrevista de Prime Focus

write code to find all permutations of string.