trie

package
v0.114.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Trie

type Trie[T any] struct {
	// contains filtered or unexported fields
}

func NewTrie

func NewTrie[T any]() *Trie[T]

NewTrie allocates and returns a new *Trie.

func (*Trie[T]) Delete

func (trie *Trie[T]) Delete(key []byte) bool

Delete removes a value from the Trie. Returns true if the value was found. Any empty nodes which become childless as a result are removed from the trie.

func (*Trie[T]) Get added in v0.89.0

func (trie *Trie[T]) Get(key []byte) T

func (*Trie[T]) Put

func (trie *Trie[T]) Put(key []byte, v T)

TODO []byte, T value parameters Put inserts a value into the trie

Jump to

Keyboard shortcuts

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