Logo

0x5a.live

for different kinds of informations and explorations.

GitHub - derekparker/trie: Data structure and relevant algorithms for extremely fast prefix/fuzzy string searching.

Data structure and relevant algorithms for extremely fast prefix/fuzzy string searching. - derekparker/trie

Visit SiteGitHub - derekparker/trie: Data structure and relevant algorithms for extremely fast prefix/fuzzy string searching.

GitHub - derekparker/trie: Data structure and relevant algorithms for extremely fast prefix/fuzzy string searching.

Data structure and relevant algorithms for extremely fast prefix/fuzzy string searching. - derekparker/trie

Powered by 0x5a.live ๐Ÿ’—

GoDoc

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

GoLang Resources

are all listed below.

Resources

listed to get explored on!!

Made with โค๏ธ

to provide different kinds of informations and resources.