Adobe interview question

Print permutations of a string