Tries

From Wiki :-)
Revision as of 06:16, 3 October 2020 by Savoundg (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Trie (or prefix tree) is used to store words in a tree. From the root to the leaves, it forms a word.

To implement a tries, each node should contain a flag that indicates if it is a complete word and a hash-map whose key is the subsequent characters and the value is the node.

Resources

https://www.youtube.com/watch?v=zIjfhVPRZCg