递归过程
https://www.bilibili.com/video/BV1Nt411K75B?from=search&seid=3890139359243729354
class TreeNode(object): def __init__(self, x): self.left = None self.right = None self.val = x def treeDeep(root): if root == None: return 0 left = treeDeep(root.left) right = treeDeep(root.right) return left + 1 if left > right else right + 1