Trie
Everything on SkillVeris tagged Trie — collected across the glossary, study notes, blog, and cheat sheets.
7 resources across 2 libraries
Study Notes(1)
Interview Questions(6)
What is a Trie?
A trie, or prefix tree, is a tree-based data structure that stores strings character by character along shared paths, letting you search, insert, and check pre…
Word Search Problem: How Would You Solve It?
Word search is solved with backtracking DFS: from every cell matching the word's first letter, recursively explore the four orthogonal neighbors while the next…
How Would You Build Autocomplete Using a Trie?
You build autocomplete by inserting every candidate string into a trie character by character, then for a typed prefix you walk the trie to the node matching t…
What is the Aho-Corasick Algorithm?
Aho-Corasick is a multi-pattern string-matching algorithm that builds a trie of all patterns augmented with failure links, letting it search text for every occ…
How to Design Search Autocomplete (Typeahead)
Search autocomplete is designed with a trie (or a precomputed top-K index per prefix) built offline from query logs, served from an in-memory cache so each key…
How to Design a Typeahead Search Service
A typeahead search service returns ranked suggestions for a partial query in tens of milliseconds by pre-building a trie or prefix index of popular queries off…