edited by
10,892 views
23 votes
23 votes

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

  1. $63$ and $6$, respectively
  2. $64$ and $5$, respectively
  3. $32$ and $6$, respectively
  4. $31$ and $5$, respectively
edited by

4 Answers

Best answer
45 votes
45 votes

Option A is correct because height $5$ means level $6$ so maximum node $= 2^l -1 =2^6 -1=63$
and for minimum, at each level only single node so total $6$.
 

edited by
9 votes
9 votes

LEVEL ARE 5 = 2^0 +  2^1 + 2^2 +2^3 +2^4 +2^5 =1 + 2+ 3 +8 +16 +32  =63 = maximum &

atleast one at each level = 1(root)+1+1+1+1+1 =6  =minimum

7 votes
7 votes
Number of nodes is maximum for a perfect binary tree. A binary tree of height h has 2

$2^{h+1} - 1$ nodes.

$2^{5 + 1} - 1 = 2^{6} - 1 = 63$

Number of nodes is minimum for a skewed binary tree. A binary tree of height h has h+1 nodes.

$h + 1 = 5 + 1 = 6$

edited by
Answer:

Related questions

28 votes
28 votes
1 answer
1
makhdoom ghaya asked Feb 13, 2015
6,932 views
Consider a max heap, represented by the array: $40, 30, 20, 10, 15, 16, 17, 8, 4$.$$\begin{array}{|l|l|}\hline \text{Array index} & \text{1} & \text{2} & \text{3} & \...
25 votes
25 votes
3 answers
3
65 votes
65 votes
12 answers
4