solve(levelOrder) receives a binary tree serialized level by level, withnull for a missing child. A helper that builds the tree is already provided.
Return the tree's maximum depth: the number of nodes on the longest path
from the root down to a leaf. An empty tree has depth 0.
This is the "hello world" of tree recursion: the answer for a node is built from
the answers for its two subtrees.
Examples
solve([3, 9, 20, null, null, 15, 7]) → 3
solve([1, null, 2]) → 2
solve([]) → 0Sample tests