Algorithms & Data Structures
Intermediate
Pro
Tries
Store a dictionary as a tree of characters and turn prefix queries into a single walk
25 min read
0 views
Learn the trie (prefix tree) data structure: how it represents a set of strings as a tree of shared prefixes, why that makes prefix and wildcard queries fast, and how to combine it with DFS/backtracking to search a 2D board of letters. Covers implementing a trie from scratch, wildcard search with '.', and multi-word board search.