trie

package
v0.0.0-...-8d3c4b6 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2021 License: MIT 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 struct {
	Root *TstNode
}

Trie implemented using ternary search trie

func Constructor

func Constructor() *Trie

func (*Trie) Insert

func (t *Trie) Insert(s string)

func (*Trie) Search

func (t *Trie) Search(s string) bool

func (*Trie) StartWith

func (t *Trie) StartWith(prefix string) bool

type TstNode

type TstNode struct {
	Value               int
	Cb                  byte
	Left, Middle, Right *TstNode
}

Jump to

Keyboard shortcuts

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