🎉 October Learning Month — learn a new software term every day!
An interactive flashcard trainer for software engineering terms.

Trie

In plain terms

A tree structure for storing strings that share common prefixes.

Going deeper

Each node represents a character, so words with the same start share the same path. Tries make prefix lookups and autocomplete very fast, at the cost of more memory than a plain list.

Under the hood

Lookup is O(length of key) independent of the number of stored words, but memory-heavy; compressed (radix) tries reduce overhead by merging single-child chains.

Examples

Autocomplete, spell-checkers, IP routing tables, dictionary prefix search.

Think of it like...

Like a branching index in a dictionary where 'c-a-t' and 'c-a-r' share the 'c-a' hallway before splitting into different rooms.

Feedback & Bug Report