Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

trie node pseudocode

class Node:
    def __init__(self) -> None:
        # Note that using a dictionary for children (as in this implementation)
        # would not by default lexicographically sort the children, which is
        # required by the lexicographic sorting in the Sorting section.
        # For lexicographic sorting, we can instead use an array of Nodes.
        self.children: Dict[str, Node] = {}  # mapping from character to Node
        self.value: Optional[Any] = None
Source by en.wikipedia.org #
 
PREVIOUS NEXT
Tagged: #trie #node #pseudocode
ADD COMMENT
Topic
Name
2+1 =