In computer science, a ternary search tree is a type of prefix tree where nodes are arranged as a binary search tree. Like other prefix trees, a ternary search tree can be used as an associative map structure with the ability for incremental string search. However, ternary search trees are more space efficient compared to standard prefix trees, at the cost of speed. Common applications for ternary search trees include spell-checking and auto-completion.
c
/ | \
a u h
| | | \
t t e u
/ / | / |
s p e i s
This implementation is in c#
I hope you find it useful.
If you like or use this project somewhere please contact me at [email protected]