Multiple choice

For height H and root at level 1, how many number of nodes will be there in a binary tree?

  1. 2H - 1

  2. 2H+1

  3. 2H+1 - 1

  4. None of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

2H - 1, gives total number of nodes present in any binary tree. 2H gives the total number of nodes at any level. So for height H, total number of nodes will be one less than next level. For example at level 3, the number of nodes is 8, for height 3 the total number of nodes is 7. This is the way how this expression works.