LinkedIn interview question

Find all the permutations of a string