2019-07-27 |

二叉树节点

A
B
C
D
答案:
class Node(object):
    def __init__(self, data, left=None, right=None):
        self.data = data
        self.left = left
        self.right = right

tree = Node(1, Node(3, Node(7, Node(0)), Node(6)), Node(2, Node(5), Node(4)))
解释:
剑指offer

发表评论

    评价:
    验证码: 点击我更换图片
    最新评论