Approach hintTry it first, then revealHide
Anagrams share the same sorted string, or the same 26-letter count signature; use that as a hash map key and collect the words for each key.
Anagrams share the same sorted string, or the same 26-letter count signature; use that as a hash map key and collect the words for each key.