Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Trie ¶
type Trie struct {
// contains filtered or unexported fields
}
Trie stores a set of strings and can quickly check if it contains an element, or one of its parents.
It implements a semi-radix/semi-compressed trie: a node that would be a single child is merged with its parent, if it is a terminal.
The word "prefix" is avoided because in practice we use the `Trie` with `SplitTLD` so parents are suffixes even if in the datastructure they are prefixes.
func (*Trie) HasParentOf ¶
Click to show internal directories.
Click to hide internal directories.