Skip to main content

๐ŸŽฎ Tries (Practice)

Companion to the Tries (Prefix Trees) guide. Build a trie and support insert + prefix search. Edit and run the code right here โ€” it executes in your browser.

๐Ÿ Your turnโ€‹

Loading editorโ€ฆ

๐Ÿง  Challenge yourselfโ€‹

  1. Add a search(word) that requires a full word match.
  2. Collect all words with a given prefix (autocomplete).
  3. How does a trie relate to how tokenizers store vocab?

Continue the learning path โ†’ Segment Tree Fenwick