Post

Trie/ Prefix Tree

βœ… Trie = Prefix Tree

TRIEval: finding something or obtaining it
tree-like data structure
efficient storing, retrieval of key-value pairs
prefix-based searching

trie is String searching

Screenshot 2024-07-24 at 12 13 22

πŸ‘ŽπŸ» in binary search tree, searching integer time-complexity is O(logN)
πŸ‘ŽπŸ» in binary search tree, searching string time-complexity is O(M*logN)
πŸ‘πŸ» in trie, searching string time-complexity is O(M)

This post is licensed under CC BY 4.0 by the author.