| 29 | |
| 30 | """ |
| 31 | class Solution: |
| 32 | |
| 33 | def maxDepth(self, root: TreeNode) -> int: |
| 34 | if root is None: |
| 35 | return 0 |
| 36 | else: |
| 37 | left_height = self.maxDepth(root.left) |
| 38 | right_height = self.maxDepth(root.right) |
| 39 | return max(left_height, right_height) + 1 |
| 40 |
nothing calls this directly
no outgoing calls
no test coverage detected