![]() |
implement-trie-prefix-tree 1.0.0
Implement Trie (Prefix Tree)
|
Definition for trie tree node. More...

Public Member Functions | |
| trie_node (char c) | |
| trie_node * | add_child (char c) |
| trie_node * | find (char c) |
| bool | is_last () |
| bool | set_last (bool last=true) |
Private Attributes | |
| char | val |
| list< unique_ptr< trie_node > > | children |
| bool | word_end |
|
inline |
|
inline |
Definition at line 24 of file main.cpp.
References children.
Referenced by Trie::insert(), Trie::search(), and Trie::startsWith().
|
inline |
|
inline |
|
private |
Definition at line 12 of file main.cpp.
Referenced by add_child(), and find().
|
private |
Definition at line 13 of file main.cpp.
Referenced by is_last(), and set_last().