Given a binary tree, find its height. The height of a tree is the number of nodes along the longest path from the root node down to the farthest leaf node.
{
"tree": [
1,
2,
3,
4,
null,
null,
5
]
}3{
"tree": [
10,
20,
30,
null,
40
]
}3{
"tree": [
1
]
}1Sign in to Run Code and Submit