757 views

The height of a binary tree is the maximum number of edges in any root to leaf path. The maximum number number of nodes in a binary tree of height $h$ is

1. $2^{h}$
2. $2^{h-1} – 1$
3. $2^{h+1} – 1$
4. $2^{h+1}$

option C will be correct.

At level 0 no. of nodes = 2^0

At level 1 no. of nodes = 2^1

At level 2 no. of nodes = 2^2

similarly,At level h-1 no. of nodes = 2^(h-1)

sum them 2^0 + 2^1 + 2^2 ..... + 2^(h -1)

sum = 2^(h +1) - 1

no. of nodes = 2^(h + 1) - 1

1 vote
1
509 views