in DS recategorized by
1,241 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
in DS recategorized by
by
1.2k views

2 Comments

edited by
# my mistake .

option B
0
0

in strict binary tree every node has 0 or 2 child

let I be no. of internal nodes and L be no. of leaf nodes

2I -(I-1) = L = 10

I+1=10 -> I=9

total nodes = L+I = 19

it will have exactly 19 nodes.

option B is correct.

1
1

2 Answers

4 votes
4 votes
Best answer

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

1 vote
1 vote
1 answer
3