16 深度遍历

优质
小牛编辑
129浏览
2023-12-01

def deep(root):
  if not root:
    return
  print root.data
  deep(root.left)
  deep(root.right)

if __name__ == '__main__':
  lookup(tree)
  deep(tree)