n-ary Tree

Question 1
Of the following, which best approximates the ratio of the number of nonterminal nodes in the total number of nodes in a complete K-ary tree of depth N ?
A
1/N
B
N-1/N
C
1/K
D
K-1/K
ISRO CSE 2020      n-ary Tree
Question 2
Consider the following rooted tree with the vertex labelled P as the root

The order in which the nodes are visited during an in-order traversal of the tree is
A
SQPTRWUV
B
SQPTUWRV
C
SQPTWUVR
D
SQPTRUWV
GATE CSE 2014 SET-3      n-ary Tree
Question 3
A complete n-ary tree is a tree in which each node has n children or no children. Let I be the number of internal nodes and L be the number of leaves in a complete n-ary tree. If L = 41, and I = 10, what is the value of n?
A
3
B
4
C
5
D
6
GATE CSE 2007      n-ary Tree
Question 4
In a complete k-ary tree, every internal node has exactly k children. The number of leaves in such a tree with n internal nodes is:
A
nk
B
(n-1)k+1
C
n(k-1)+1
D
n(k-1)
GATE CSE 2005      n-ary Tree
Question 5
The number of leaf nodes in a rooted tree of n nodes, with each node having 0 or 3 children is
A
n/2
B
\frac{(n-1)}{3}
C
\frac{(n-1)}{2}
D
\frac{(2n+1)}{3}
GATE CSE 2002      n-ary Tree
Question 6
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
A
x(n-1)+1
B
xn-1
C
xn+1
D
x(n+1)
GATE CSE 1998      n-ary Tree
There are 6 questions to complete.

Leave a Comment

Like this FREE website? Please share it among all your friends and join the campaign of FREE Education to ALL.