Aristocrat Interview Question

Reverse words in a string , generate all permutations of a string.