trie

package
v0.0.0-...-73cdf94 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 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 Node

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

type Trie

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

func NewTrie

func NewTrie() *Trie

func (*Trie) Add

func (t *Trie) Add(word string)

向Trie中添加新单词word

func (*Trie) Contains

func (t *Trie) Contains(word string) bool

查询单词word是否存在Trie中

func (*Trie) IsPrefix

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

查询Trie中是否存在以prefix为前缀的单词

func (*Trie) Len

func (t *Trie) Len() int

Directories

Path Synopsis
leetcode
208
211
677

Jump to

Keyboard shortcuts

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