class Solution:
def maxDepth(self , root ):
if root==None:
return 0
left_depth=self.maxDepth(root.left)
right_depth=self.maxDepth(root.right)
max_depth=max(left_depth,right_depth)+1
return max_depth
09-05
230
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
09-02
1155
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)