...
Question 8191 – Data-Structures
April 17, 2024
Question 8395 – Data-Structures
April 17, 2024
Question 8191 – Data-Structures
April 17, 2024
Question 8395 – Data-Structures
April 17, 2024

Question 8226 – Data-Structures

A binary tree T has 20 leaves. The number of nodes in T having two children is _________.

Correct Answer: A

Question 11 Explanation: 
Let the number of vertices of a binary tree with “p” leaves be n then the tree has
(i) p vertices (i.e., leaves) of degree 1
(ii) one vertex (i.e., root of T) of degree 2
(iii) ‘n – p – 1’ (i.e., interval) vertices of degree 3

(iv) n – 1 edges
∴ By Handshaking theorem,
p × 1 + 1 × 2 + (n – p – 1) × 3 = 2(n – 1)
⇒n = 2p – 1
= 39 as p = 20
∴ n – p = 19 vertices have exactly two children
A
19
B
20
C
21
D
22
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!