trie

package
v0.0.0-...-ade9fc0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Element

type Element struct {

	// The value stored with this element.
	Value interface{}
	// contains filtered or unexported fields
}

Element is an element of tree node.

func NewElement

func NewElement() *Element

NewElement returns an initialized element.

func (*Element) Init

func (e *Element) Init() *Element

Init initializes or clears element e.

type Trie

type Trie struct {
	// contains filtered or unexported fields
}

Trie implement a trie tree.

func New

func New() *Trie

New returns an initialized trie tree.

func (*Trie) Dump

func (t *Trie) Dump()

Dump used for debug.

func (*Trie) Find

func (t *Trie) Find(key string) *Element

Find find key in trie tree. If not found return nil.

func (*Trie) Init

func (t *Trie) Init() *Trie

Init initializes or clears trie tree t.

func (*Trie) Insert

func (t *Trie) Insert(key string) *Element

Insert insert key into trie tree.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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