Mental Model
Group words that have the same letters by sorting their letters and using that as a key.
Analogy: Imagine sorting letters of each word like arranging puzzle pieces in the same order, so all puzzles with the same pieces look identical and can be grouped together.
words: ["eat", "tea", "tan", "ate", "nat", "bat"] hash_map: key: sorted letters value: list of words Example: "aet" -> ["eat", "tea", "ate"] "ant" -> ["tan", "nat"] "abt" -> ["bat"]
