trie

package
v0.0.0-...-7253c86 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WordSearchII

func WordSearchII(board [][]byte, words []string) []string

Types

type Trie

type Trie struct {
	Root *util.TrieNode
}

func Constructor

func Constructor() Trie

func (*Trie) Insert

func (this *Trie) Insert(word string)

func (*Trie) Search

func (this *Trie) Search(word string) bool

func (*Trie) StartsWith

func (this *Trie) StartsWith(prefix string) bool

type WordDictionary

type WordDictionary struct {
	Root *util.TrieNode
}

func WordDictionaryConstructor

func WordDictionaryConstructor() WordDictionary

func (*WordDictionary) AddWord

func (this *WordDictionary) AddWord(word string)

func (*WordDictionary) Search

func (this *WordDictionary) Search(word string) bool

func (*WordDictionary) SearchHelper

func (this *WordDictionary) SearchHelper(word string, index int, node *util.TrieNode) bool

Jump to

Keyboard shortcuts

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