Charles Schwab Interview Question

How to print all permutations of a string