250+ TOP MCQs on K-ary Tree and Answers

Data Structures & Algorithms Multiple Choice Questions on “K-ary Tree – 2”.

1. Can leaf node be called child node in a K-ary tree?
a) True
b) false

Answer: a
Clarification: Leaf node is a node that has no child. Since Leaf node will always be the node on the last level of k-ary tree, so it can be called child node of given parent node in K-ary tree.

2. Can child node be always called Leaf node in the K-ary tree?
a) True
b) False

Answer: b
Clarification: Leaf node is any node that does not contain any children. Child node may or may not contain more nodes. Child node will only be called leaf Node if the node has no child node.

3. What is the upper bound for maximum leaves in K-ary tree with height h?
a) K*h
b) K^h
c) K+h
d) K-h

Answer: b
Clarification: In the K-ary tree having height h, the upper bound for having maximum number of leaves is k^h.

4. What is the height of a K-ary tree having only root node?
a) 1
b) 0
c) 2
d) 3

Answer: b
Clarification: Height of a K-ary tree does not include the root node. So the height of the K-ary tree is without root node is 0.

5. Which one of the following is the correct formulae to find the parent node at index I?
a) (I-1)/K
b) (I+1)/K
c) (I*1)/K
d) (I-2)/K

Answer: a
Clarification: The parent node for the node of index I in a K-ary tree is given by (I-1)/K.

6. How many extra nodes are there in Full K-ary tree than complete K-ary tree?
a) 1
b) 2
c) 3
d) Both have same number of nodes

  250+ TOP MCQs on Randomized Binary Search Tree and Answers

Answer: d
Clarification: Every Full K-ary tree is also a complete K-ary tree. Therefore, both have same number of nodes.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top