Ternary search trees are more efficient compared to standard prefix trees (Trie), at the cost of speed. Common applications for ternary search trees include spell checking and auto-completion.
Ternary search trees(TST) similar to Binary Search Tree but each
node has three children.
Visualization of TST: https://bom.to/Ni9Wj
node has three children.
Visualization of TST: https://bom.to/Ni9Wj
3 operations in my TST code:
- Insert the keyword.
- Check exits of the keyword.
- Traverse and return words in TST.
Source code in Java
Source code in C++
WOW, I like it =)) tks u very much =))))))))))))))) from teammate with love <#
ReplyDelete