CS Visual Lab
Explore
Learning Paths
5 modules live
Get Started
Tries & Suffix Trees
Module 4.7 — Prefix tree construction and search
Preset:
Animals
Tech
Simple
Insert
Clear
Trie Structure
∅
Internal
End of word
Search match
Words (0)
No words inserted
Trie Stats
Words
0
Nodes
1
Max Depth
0
Time Complexity
Insert
O(m)
Search
O(m)
Prefix
O(m + k)
Delete
O(m)
How Tries Work
Each node represents a character. Paths from root to marked nodes form words.
Yellow nodes
mark end of a valid word.
Common prefixes share the same path, saving space.
Used in: autocomplete, spell-check, IP routing, DNA sequencing.