trie
trie copied to clipboard
Data structure and relevant algorithms for extremely fast prefix/fuzzy string searching.
### summary - add size - fix data race for size var.
bug1: add duplicated key into the trie will incr the size but the key was replaced. bug2: the meta was not store in the node of last character of key...
Is there a limit parameter for PrefixSearch? What if I only want 10 results? ```golang t.PrefixSearch("foo", 10) ```
This package is pulled in as a dependency of one of my dependencies, and it's causing unusually high RAM usage. Related issue: https://github.com/prologic/bitcask/issues/67 This looks like a memory leak to...
I was wondering if this library supports concurrency, and saw that a recent commit seems to imply that the support has been added: https://github.com/derekparker/trie/commit/1ce4922c7ad906a094c6298977755068ba76ad31 However, wouldn't your trie still be...
add methods: func Free(t *Trie) Free all Nodes of the Trie, renew the root Node. func (n *Node) FreeChild() Free the node and it's children.
Was ``` $ go test -bench . -benchtime 4s BenchmarkTieKeys-4 1000000 8525 ns/op BenchmarkPrefixSearch-4 10000 627035 ns/op BenchmarkFuzzySearch-4 1000 8602394 ns/op BenchmarkBuildTree-4 30 175859534 ns/op PASS ok trie 31.224s ```...
#12