Clir interview question

Technical question: How to get all permutations of a string