Question 9974 – Data-Structures
November 15, 2023
Question 8932 – Compiler-Design
November 15, 2023
Question 9974 – Data-Structures
November 15, 2023
Question 8932 – Compiler-Design
November 15, 2023

Question 9997 – Data-Structures

A complete n-ary tree is one in which every node has 0 or n sons. If x is the number of internal nodes of a complete n-ary tree, the number of leaves in it is given by

Correct Answer: A

Question 22 Explanation: 
No. of internal node = x
Let no. of leaf nodes = L
Let nt be total no. of nodes.
So, L+x = nt —–(I)
Also for n-ary tree with x no. of internal nodes, total no. of nodes is,
nx+1 = nt —–(II)
So, equating (I) & (II),
L+x = nx+1
L = x(n-1) + 1
A
x(n-1) + 1
B
xn – 1
C
xn + 1
D
x(n+1)
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!!