📜  尝试插入伪代码 - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:45.992000             🧑  作者: Mango

代码示例1
def insert(node: Node, key: str, value: Any) -> None:
    """Insert key/value pair into node."""
    for char in key:
        if char not in node.children:
            node.children[char] = Node()
        node = node.children[char]
    node.value = value