trie node pseudocode

Solutions on MaxInterview for trie node pseudocode by the best coders in the world

showing results for - "trie node pseudocode"
Mira
19 Nov 2020
1class Node:
2    def __init__(self) -> None:
3        # Note that using a dictionary for children (as in this implementation)
4        # would not by default lexicographically sort the children, which is
5        # required by the lexicographic sorting in the Sorting section.
6        # For lexicographic sorting, we can instead use an array of Nodes.
7        self.children: Dict[str, Node] = {}  # mapping from character to Node
8        self.value: Optional[Any] = None
9
similar questions
queries leading to this page
trie node pseudocode