Glossary: Algorithms Beyond the Basics
Trie
Also written: prefix tree, tries
A tree of letters where words with the same start share the same path. Each node has a `children` dict and an `is_word` flag, so lookups cost one step per letter.
Glossary: Algorithms Beyond the Basics
Also written: prefix tree, tries
A tree of letters where words with the same start share the same path. Each node has a `children` dict and an `is_word` flag, so lookups cost one step per letter.