📜  二叉树 - Python 代码示例

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

代码示例1
class Node:
    def __init__(self,key):
        self.left = None
        self.right = None
        self.val = key
 
root = Node(1)
root.left      = Node(2);
root.right     = Node(3);
root.left.left  = Node(4);