recategorized by
1,266 views
2 votes
2 votes

A strictly binary tree with $10$ leaves

  1. cannot have more than $19$ nodes
  2. has exactly $19$ nodes
  3. has exactly $17$ nodes
  4. has exactly $20$ nodes
recategorized by

2 Answers

Best answer
4 votes
4 votes

In strict binary tree each node can have either 0 children or 2 children

If no. of leaves are $L$ then it contains $2L-1$ nodes.

Suppose $N$ is total no of nodes, $I$ is total internal nodes and $L$ no of leaves in tree 

$N=2*I+1$.....(1)

Also $N= I+L$.....(2)

From (1) and (2)

$I+L=2I+1$

$I=L-1$

$N=2(L-1)+1=2L-1$

With $10$ leaves it contains $2*10-1= 19$ nodes

Hence option B) is correct

selected by
0 votes
0 votes
B) Exactly 19 nodes.

Strictly binary tree mwans either 0 children or 2 chidren
Answer:

Related questions

3 votes
3 votes
2 answers
1
gatecse asked Dec 17, 2017
1,255 views
The $in$-$order$ and $pre$-$order$ traversal of a binary tree are $\text{d b e a f c g}$ and $\text{a b d e c f g}$ respectively.The $post$-$order$ traversal of a binary ...
3 votes
3 votes
2 answers
2
gatecse asked Dec 17, 2017
3,758 views
Which one of the following property is correct for a red-black tree?Every simple path from anode to a descendant leaf contains the same number of black nodes.If a node is...
1 votes
1 votes
1 answer
3
gatecse asked Dec 17, 2017
888 views
The minimum number of stacks needed to implement a queue is$3$$1$$2$$4$
1 votes
1 votes
1 answer
4