第三题题解: class Solution:     def getTreeSum(self, tree: TreeNode) -> int:         def height(root):             if root is None:                 return 0             return max(height(root.left), height(root.right)) + 1         return (2 ** height(tree) - 1) % 1000000007