Mental Model
A trie stores words by shared prefixes in a tree, making prefix search fast. A hash map stores whole words as keys, so prefix search needs checking many keys.
Analogy: Imagine a phone book organized by first letters (trie) versus a pile of index cards sorted by full names (hash map). Finding all names starting with 'Jo' is quicker in the organized phone book.
Trie:
root
├─ j
│ ├─ o
│ │ ├─ h
│ │ │ └─ n (end)
│ │ └─ e
│ │ └─ l (end)
Hash Map:
{ "john": value, "joel": value, "jane": value }