Redirected
recategorized by
2,886 views
1 votes
1 votes

The number of nodes in a complete binary tree of height $h$ (with roots at level $0$) is equal to

  1. $2^{0} + 2^{1} + ….. 2^{h}$
  2. $2^{0} + 2^{1} + ….. 2^{h-1}$ 
  3. $2^{0} + 2^{1} + ….. 2^{h+1}$
  4. $2^{1} + ….. 2^{h+1}$
recategorized by

2 Answers

Best answer
2 votes
2 votes

Option A is Ans

Height:--No of edges between root node to lowest descendent node

The total no. Of nodes in complete binary tree is depicted below:--

selected by
2 votes
2 votes

complete binary tree is filled left to right

and we know that maximum number of nodes possible in complete binary tree of height h = $2^{h+1}-1$

here,

option A)  $2^0+2^1+2^2+2^3+......+2^{h-1}+2^h = 1 + 2(\frac{2^h-1}{2-1}) = 1 + 2^{h+1} - 2$

$= 2^{h+1} - 1$

Related questions

2 votes
2 votes
1 answer
1
makhdoom ghaya asked Aug 16, 2016
2,067 views
The post order traversal of a binary tree is DEBFCA. Find out the preorder traversal.ABFCDEADBFECABDECFABDCEF
3 votes
3 votes
1 answer
2
makhdoom ghaya asked Aug 12, 2016
2,421 views
Which of the following is a bad example of recursion ?FactorialFibonacci numbersTower of HanaiTree traversal
1 votes
1 votes
4 answers
3
makhdoom ghaya asked Aug 21, 2016
3,486 views
What is the probability of choosing correctly an unknown integer between $0$ and $9$ with $3$ chances ?$\frac{963}{1000}$$\frac{973}{1000}$$\frac{983}{1000}$$\frac{953}{1...
1 votes
1 votes
2 answers
4
makhdoom ghaya asked Aug 21, 2016
1,451 views
A telephone conference call is an example of which type of communications ?Same time / same placeSame time / different placeDifferent time / different placeDifferent time...