1For Two Sum, build the map as you iterate — no need for a separate pass.
2Use `defaultdict(int)` or `Counter` in Python for frequency maps without explicit initialization.
3For anagram grouping, the key is `tuple(sorted(word))` or the sorted string itself.
4Hash Set (set of values, no associated data) is O(1) for contains check — prefer it over a list for membership.