Amazon interview question

Find all the permutations of a string.