Given the root of an n-ary tree
root. Return the maximum depth of the tree. An empty tree has depth 0. The tree is given in the format: [root, null, root_children, null, next_node_children, ...].Example 1
Input: root = []
Output: 0
Explanation: An empty tree has depth 0.
Output: 0
Explanation: An empty tree has depth 0.
Example 2
Input: root = [1,null,3,2,4,null,5,6]
Output: 3
Explanation: Maximum depth is 3 levels.
Output: 3
Explanation: Maximum depth is 3 levels.