recategorized by
1,893 views
3 votes
3 votes

A binary tree has 127 nodes. Which of the following is an invalid height for this tree ?

$a). 16 $

$b). 6$

$c). 21$

$d). 43$

recategorized by

1 Answer

2 votes
2 votes
Option A ==> Height = 16 , max number of nodes possible is  2^16 - 1;

Option B ==> Height = 6 , max number of nodes possible is  2^6 - 1;

Option C ==> Height = 21 ,max number of nodes possible is  2^21 - 1;

Option D ==> Height = 43 , max number of nodes possible is  2^43 - 1;

Numer of nodes here is 127 which is not possible with Option B.

Related questions

1 votes
1 votes
1 answer
1
0 votes
0 votes
1 answer
2
0 votes
0 votes
1 answer
4
Prince Sindhiya asked Jan 2, 2019
731 views
A full binary tree is a tree in which every node other than the leaves has two children. If there are 600 leaves then total number of leaf nodes are?