Documentation ¶
Overview ¶
package trie provides a trie implementation for representing words as a sequence of runes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Trie ¶
type Trie struct { // IsEnd represents that this node is the end of a valid word. IsEnd bool // Branches is a map of rune to next node in the Trie representing // that rune. Branches map[rune]*Trie }
Trie is a single node in a Trie representing words. The rune for each node is not included in the node itself as it is used for the map lookup/branch.
Click to show internal directories.
Click to hide internal directories.