Group Anagrams — bucket by sorted letters
Two words are anagrams exactly when their letters sort to the same string. Use that sorted string as a map key, and each word drops into its group.
Try:
← Prev
Next →
▶ Play
Reset
input words
groups
(sorted-letters key → words)