体验新版 GitCode,发现更多精彩内容 >>
### 104. Maximum Depth of Binary Tree 题目: <https://leetcode.com/problems/maximum-depth-of-binary-tree/> 难度: Easy
简单题,但是这道题跟[leetcode111](https://github.com/Lisanaaa/thinking_in_lc/blob/master/111._minimum_depth_of_binary_tree.md)不一样,这道题没有特殊情况,所以一行就够了
```python
class Solution(object): def maxDepth(self, root): """ :type root: TreeNode :rtype: int """
return 1 + max(map(self.maxDepth, (root.left, root.right))) if root else 0
```