Return the maximum depth of a binary tree. Trees are passed as nested objects `{ val, left, right }`. Variant **#9**.
Example 1
Input: root = nested tree (depth 4)
Output: 4
Constraints
Acceptance: 71% · Topics: tree, dfs, bfs
← All practice problems