Depth of Binary Tree
Calculate the maximum depth of a binary tree.
Return the number of nodes on the longest line starting from the root node and ending at the farthest leaf node.

const maxDepth = function(root) {
// Enter your logic here...
}
Examples:
Input: [0, 1, 2, null, 4]
Output: 3
Explanation: It takes 3 nodes to reach at the farthest leaf node.
Input: [0, null, 1]
Output: 2
Explanation: It takes 2 nodes to reach at the farthest leaf node.