1. 首页
  2. 数据库
  3. 其它
  4. python数据结构:求二叉树深度

python数据结构:求二叉树深度

上传者: 2020-12-31 16:44:54上传 PDF文件 23.63KB 热度 13次
python求二叉树深度 1.代码实现 class BinaryTreeNode(object): # 创建二叉树结点的函数 def __init__(self): self.data = '#' self.LChild = None self.RChild = None class BinaryTree(object): # 创建二叉树的函数 def CreateBinaryTree(self, Root): data = input('->') if data == '#':
下载地址
用户评论