Anagrams: Difference between revisions
Content deleted Content added
imported>Chinhouse No edit summary |
imported>Chinhouse |
||
Line 5,291: | Line 5,291: | ||
wordSets = {} |
wordSets = {} |
||
for word in wordList |
for word in wordList |
||
k = makeKey(word) |
|||
if not wordSets.hasIndex( |
if not wordSets.hasIndex(k) then |
||
wordSets[ |
wordSets[k] = [word] |
||
else |
else |
||
wordSets[ |
wordSets[k].push(word) |
||
end if |
end if |
||
end for |
end for |