Algorithm to generate anagrams
Most of these answers are horribly inefficient and/or will only give one-word solutions (no spaces). My solution will handle any number of words and is very efficient. What you want is a trie data structure. Here’s a complete Python implementation. You just need a word list saved in a file named words.txt You can try … Read more