I want to find the anagram phase from the dictionary which checks it against the word mentioned by the users. A few examples, have shared ::
Example:
i/p --> Barbara Bush, o/p {"abash", "bar", "rub"}
i/p --> Clint Eastwood, o/p {"old", "west", "action"}
Assuming you already have a list
all_wordsof all English words:Below in python.
Step 1: Building the anagram datastructure
Step 2: Searching for anagrams of submultisets
Testing: