The most used but overlooked data structure | Learn Data Structure with Shubham part 4
TRIE Trie data structure or (radix tree(radix trie is compressed trie), prefix tree, digital tree) A trie, also called digital tree or prefix tree, is a kind of search tree—an ordered tree data structure used to store a dynamic set or associative array where the keys are usually strings. Unlike a binary search tree, no node in the tree stores the key associated with that node; instead, its position in the tree defines the key with which it is associated; i.e., the value of the key is distributed across the structure Advantages: 1. Sometimes Space-Efficient. If you're storing lots of words that start with similar patterns, tries may reduce the overall storage cost by storing shared prefixes once. 2. Efficient Prefix Queries. Tries can quickly answer queries about words with shared prefixes, like: How many words start with "choco...