trie

package
v2.1.3 Latest Latest
Warning

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

Go to latest
Published: May 19, 2024 License: BSD-3-Clause Imports: 1 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 interface {
	// Inserts a word into trie
	Insert(word string)

	// Returns words with prefix
	Search(prefix string) set.Set[string]

	// Searches for whole word in the trie,
	// returns true only if the word is added to trie before with all characters
	Contains(word string) bool
}

func NewTrie

func NewTrie() Trie

Jump to

Keyboard shortcuts

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