Wells Fargo interview question

Design the algorithm to generate anagrams for a string.