-
The height of a tree is the length of the longest root-to-leaf path in it. The maximum and minimum number of nodes in a binary tree of height 5 are
-
- 63 and 6, respectively
- 64 and 5, respectively
- 32 and 6, respectively
- 31 and 5, respectively
- 63 and 6, respectively
Correct Option: A
We know that the maximum no. of nodes in a binary tree with (height) h = 2h + 1 – 1.
Here h = 5, then, we easily calculate the h as :
h = 25 + 1 – 1= 64 – 1 = 63
And the minimum no. of nodes with height h is h + 1.
∴ h = 5