Maximum Depth of Binary Tree
Given the root of a binary tree ({ val, left, right }, null for a missing child), return its maximum depth — the number of nodes along the longest path from root to a leaf. The simplest recursive definition: a tree's depth is 1 + max(depth(left), depth(right)), with an empty tree having depth 0.
maxDepth(tree([3, 9, 20, null, null, 15, 7])); // 3