Group Anagrams

Hash map · Map many values to one signature · Easy · about 22 min

Why it matters

Good hashing starts by choosing a key that captures exactly what should be equal.

How it connects

Two Sum mapped a number to an index; now map each word to a shared signature.

Try first

What identical key would “eat” and “tea” produce?

Interview cue

The map key is a canonical representation, so equivalent words land in one group.