Easy
Quiz
#104 Maximum Depth of Binary Tree
APPROACH
Given the root of a binary tree, find and return its maximum depth.
The maximum depth is the number of nodes along the longest path from the root down to the farthest leaf.
Example 1:
Input: root = [3,9,20,null,null,15,7]
Output: 3
Example 2:
Input: root = [1,null,2]
Output: 2
1 of 4
1:00
What is the optimal approach for this problem?