class Solution(object):
def maxDepth(self, root):
"""
:type root: TreeNode
:rtype: int
"""
if root==None: return 0
return max(1+self.maxDepth(root.left), 1+self.maxDepth(root.right))
class Solution(object):
def maxDepth(self, root):
"""
:type root: TreeNode
:rtype: int
"""
if root==None: return 0
return max(1+self.maxDepth(root.left), 1+self.maxDepth(root.right))