https://github.com/mrogaski/ternarytree
A ternary search tree implementation in Go.
https://github.com/mrogaski/ternarytree
go golang ternary-search-tree trie-structure
Last synced: 6 months ago
JSON representation
A ternary search tree implementation in Go.
- Host: GitHub
- URL: https://github.com/mrogaski/ternarytree
- Owner: mrogaski
- License: mit
- Created: 2019-02-27T02:36:00.000Z (over 7 years ago)
- Default Branch: develop
- Last Pushed: 2019-03-03T07:10:42.000Z (over 7 years ago)
- Last Synced: 2024-06-20T15:58:38.508Z (about 2 years ago)
- Topics: go, golang, ternary-search-tree, trie-structure
- Language: Go
- Size: 37.1 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# ternarytree
[](https://travis-ci.org/mrogaski/ternarytree)
[](https://codecov.io/gh/mrogaski/ternarytree)
[](https://www.codacy.com/app/mrogaski/ternarytree?utm_source=github.com&utm_medium=referral&utm_content=mrogaski/ternarytree&utm_campaign=Badge_Grade)
[](https://goreportcard.com/report/github.com/mrogaski/ternarytree)
[](https://godoc.org/github.com/mrogaski/ternarytree)
[](https://raw.githubusercontent.com/mrogaski/ternarytree/master/LICENSE)
A Go implementation of ternary search trees as described by Jon Bentley and Robert Sedgewick.
Ternary search trees are interesting data structures that provide a means of storing and accessing
strings. They combine the time efficiency of digital tries with the space efficiency of binary search trees.
Unlike a hash, they also maintain information about relative order.
## Installation
To install ternarytree package, you need to install Go and set your Go workspace first.
1. Download and install it:
```sh
$ go get -u github.com/mrogaski/ternarytree
```
2. Import it in your code:
```go
import "github.com/mrogaski/ternarytree"
```
## References
- Bentley, Jon and Sedgewick, Robert. "Ternary Search Trees". Dr. Dobb's
Journal, April 1998. http://www.drdobbs.com/database/ternary-search-trees/184410528
- Bentley, Jon and Sedgewick, Robert. "Fast Algorithms for Sorting and
Searching Strings". Eighth Annual ACM-SIAM Symposium on Discrete Algorithms
New Orleans, January, 1997. http://www.cs.princeton.edu/~rs/strings/