bashminov / twice Goto Github PK
View Code? Open in Web Editor NEWWord Jumble Solution. Script accepts a word on command and prints all the words that can be constructed using letters. I preprocess the dictionary so that every word(or words) that has the same letters would map to the same position in a python dictionary. That I sort every permutation of letters in input and index them into the word dictionary in constant time at the expense of extra space