Wells Fargo Interview Question

Design the algorithm to generate anagrams for a string.