Sokrati interview question

all permutations of given string