第三题 大佬可以帮忙看看哪里错了么?只过了百分之20
self.ans = 0 def traverse(self,root): if root == None: return 0 left = self.traverse(self, root.left) right = self.traverse(self, root.right) if left == right: self.ans += 1 else: self.ans =2* max(left,right) return left + right + 1 return self.ans