Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

Trie

Trie implementation in Go. Inspired by John Resig's trie-js.

Motivation

The trie data structure is particularly interresting to me as it's surprisingly simple yet powerful.

The data structure is nothing more than the recursive type type Node map[rune]Node. With this simple type we're able to index words by prefix and perform fast lookups.

Usage

import "github.com/alexkappa/trie"

t := trie.New()
t.Index([]string{"ab", "ac", "ad", "abc"})
t.Search("ab") // ["ab" "abc"]

The API documentation is available at godoc.org.

About

Trie implementation in Go

Resources

License

Releases

No releases published

Packages

No packages published

Languages