trie alternatives and similar packages
Based on the "Data Structures" category.
Alternatively, view trie alternatives based on common mentions on social networks and blogs.
-
golang-set
A simple, battle-tested and generic set type for the Go language. Trusted by Docker, 1Password, Ethereum and Hashicorp. -
hyperloglog
HyperLogLog with lots of sugar (Sparse, LogLog-Beta bias correction and TailCut space reduction) brought to you by Axiom -
ttlcache
An in-memory cache with item expiration and generics [Moved to: https://github.com/jellydator/ttlcache] -
Bloomfilter
Face-meltingly fast, thread-safe, marshalable, unionable, probability- and optimal-size-calculating Bloom filter in go -
hilbert
Go package for mapping values to and from space-filling curves, such as Hilbert and Peano curves. -
cuckoo-filter
Cuckoo Filter go implement, better than Bloom Filter, configurable and space optimized 布谷鸟过滤器的Go实现,优于布隆过滤器,可以定制化过滤器参数,并进行了空间优化 -
go-rquad
:pushpin: State of the art point location and neighbour finding algorithms for region quadtrees, in Go -
nan
Zero allocation Nullable structures in one library with handy conversion functions, marshallers and unmarshallers
WorkOS - The modern identity platform for B2B SaaS
Do you think we are missing an alternative of trie or a related project?
Popular Comparisons
README
Trie
Data structure and relevant algorithms for extremely fast prefix/fuzzy string searching.
Usage
Create a Trie with:
t := trie.New()
Add Keys with:
// Add can take in meta information which can be stored with the key.
// i.e. you could store any information you would like to associate with
// this particular key.
t.Add("foobar", 1)
Find a key with:
node, ok := t.Find("foobar")
meta := node.Meta()
// use meta with meta.(type)
Remove Keys with:
t.Remove("foobar")
Prefix search with:
t.PrefixSearch("foo")
Fast test for valid prefix:
t.HasKeysWithPrefix("foo")
Fuzzy search with:
t.FuzzySearch("fb")
Contributing
Fork this repo and run tests with:
go test
Create a feature branch, write your tests and code and submit a pull request.
License
MIT
*Note that all licence references and agreements mentioned in the trie README section above
are relevant to that project's source code only.