Depth is 1 + max depth of children.
DFS recursively; null nodes have depth 0.
A path’s depth is counted by nodes; the longest root-to-leaf path determines the maximum depth.
Depth is 1 + max depth of children.
DFS recursively; null nodes have depth 0.
A path’s depth is counted by nodes; the longest root-to-leaf path determines the maximum depth.