trie

package module
v0.0.0-...-27f52c9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2019 License: MIT Imports: 1 Imported by: 0

README

Trie

Yet another trie implementation.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	Symbol   rune
	Parent   *Node
	Children map[rune]*Node
	Data     interface{}
}

type Trie

type Trie struct {
	sync.RWMutex
	Root *Node
}

func NewTrie

func NewTrie() *Trie

func (*Trie) Delete

func (trie *Trie) Delete(key string) bool

func (*Trie) HasPrefix

func (trie *Trie) HasPrefix(prefix string) map[string]interface{}

func (*Trie) Insert

func (trie *Trie) Insert(key string, data interface{})

func (*Trie) Search

func (trie *Trie) Search(key string) interface{}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL