Skip to content

A C++ package that implements ternary search tree, which combines the time efficiency of digital tries with the space efficiency of binary search trees. It it is reported comparable with hashing table in most cases, and substantially faster than hashing for unsuccessful searches.

Notifications You must be signed in to change notification settings

jerry2yu/ternary-search-tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This package includes files of TernarySearchTree class.

  • Ternary search tree stores keys in sorted order, which can be used as a symbol table.

  • Searching operation is lightning fast, it is reported comparable with hashing table in most cases, and substantially faster than hashing for unsuccessful searches.

  • Ternary search tree gracefully grows and shrinks, unlike hash table which usually use an array and need to be rebuilt after large size changes.

  • Advance operations such as traversal to get sorted item list, partial matching and near-neighbor search are supported natively.

Ternary search tree is initially proposed by Jon Bentley and Bob Sedgewick on 1997. see references:

The folder of the dictionary file in main.cpp file need to be changed according to your setting.

If you found any bug, please kindly send email to me at jerryy@gmail. Comments or suggestions are very welcomed.

About

A C++ package that implements ternary search tree, which combines the time efficiency of digital tries with the space efficiency of binary search trees. It it is reported comparable with hashing table in most cases, and substantially faster than hashing for unsuccessful searches.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages