Monday, December 10, 2018

Source code Ternary Search Tree in Java and C++




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




operations in my TST code:

  1. Insert the keyword.
  2. Check exits of the keyword.
  3. Traverse and return words in TST.

Source code in Java


Source code in C++


khuy

Author & Editor

You may come here to learn not to laugh sorry bout that btw haha

1 nhận xét:

  1. WOW, I like it =)) tks u very much =))))))))))))))) from teammate with love <#

    ReplyDelete

 
biz.