Given the root of a binary tree, return its height.
Input Format
Integer n (number of nodes) n space-separated integers in level-order (use -1 for null)
Output Format
Integer (height of the tree)
Sample Input
7 1 2 3 4 5 -1 -1
Sample Output
3
Given the root of a binary tree, return its height.
Integer n (number of nodes) n space-separated integers in level-order (use -1 for null)
Integer (height of the tree)
7 1 2 3 4 5 -1 -1
3