A trie (prefix tree) is a tree where each edge represents a character and each path from the root spells a prefix. Words that share a prefix share the same path, making prefix lookups extremely fast.
Structure
text
Insert "cat", "car", "dog":
root
/ \
c d
| |
a o
/ \ |
t* r* g* (* marks end-of-word)
