Pergunta de entrevista da empresa Wells Fargo

Design the algorithm to generate anagrams for a string.