Python深度遍历
def deep(root):
if not root:
return
print root.data
deep(root.left)
deep(root.right)
if __name__ == '__main__':
lookup(tree)
deep(tree)
当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »
def deep(root):
if not root:
return
print root.data
deep(root.left)
deep(root.right)
if __name__ == '__main__':
lookup(tree)
deep(tree)
当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »