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