📜  trie 节点伪代码 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:36.600000             🧑  作者: Mango

代码示例1
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