Day 16 of LeetCode
Documenting LeetCode solving.
Q47
104. Maximum Depth of Binary Tree
Easy. Tree
Recursive DFS.
class Solution:
def maxDepth(self, root: Optional[TreeNode]) -> int:
if not root:
return 0
return 1 + max(self.maxDepth(roo...
evelynsjourney.hashnode.dev2 min read