Engineering Questions with Answers - Multiple Choice Questions

K-ary Tree Multiple Choice MCQ – 1

1 - Question

How many child nodes does each node of K-ary Tree contain?
a) 2
b) 3
c) more than k
d) at most k

View Answer

Answer: d
Explanation: Each node of K-ary tree contains at most k nodes. While tree with 2 nodes is called Binary tree and tree with 3 nodes is called Ternary tree.




2 - Question

Which of the following is the name of the node having child nodes?
a) Brother
b) Sister
c) Mother
d) Parent

View Answer

Answer: d
Explanation: Parent node is the node having child nodes and child nodes may contain references to their parents. Parent node is a node connected by a directed edge to its child.




3 - Question

What is the depth of the root node of K-ary tree?
a) 2
b) 1
c) 0
d) 3

View Answer

Answer: c
Explanation: Depth is defined as the length of the path from root to the node. So the depth of root node in K-ary tree is 0.




4 - Question

What is the Height of the root node of K-ary tree?
a) 1
b) 2
c) 3
d) 0

View Answer

Answer: d
Explanation: Height of K-ary tree is defined as the length of path from root to deepest node in tree. Therefore, height of root node in K-ary tree is 0.




5 - Question

 Which node is the root node of the following K-ary tree?
k-ary-tree-multiple-choice-questions-answers-mcqs-q5
a) A
b) B
c) C
d) D

View Answer

Answer: a
Explanation: Node A is called the root node of the above K-ary tree while the Node B, Node C, Node D are called Leaf node.




6 - Question

Which node is the Leaf node in the following K-ary tree?
k-ary-tree-multiple-choice-questions-answers-mcqs-q6
a) A
b) B
c) D
d) F

View Answer

Answer: d
Explanation: Leaf node is any node that does not contain any children. Since Node F is the node without any children, So F is called Leaf Node. While Node A is root node and Node B, Node C, Node D is parent node of their children.




7 - Question

Which node is the parent node of Node 5?
k-ary-tree-multiple-choice-questions-answers-mcqs-q7
a) 1
b) 5
c) 2
d) 3

View Answer

Answer: c
Explanation: Since Node 2 has two children Node 5 and Node 6, So Node 2 is the parent node of Node 5. While Node 1 is root node and Node 3 and Node 5 are Leaf node.




8 - Question

 Is parent node of Node 4 and root node of the given K-ary tree same?
k-ary-tree-multiple-choice-questions-answers-mcqs-q7
a) True
b) False

View Answer

Answer: a
Explanation: Since Root node of the ternary tree is Node 1 and also Node 1 has three children that is Node 2, Node 3, Node 4. So parent node of Node 4 and the root node of the ternary tree are same.




9 - Question

Which node is the child node of Node C in the following K-ary tree?
k-ary-tree-multiple-choice-questions-answers-mcqs-q6
a) A
b) C
c) G
d) H

View Answer

Answer: c
Explanation: The Child node is the node that has a directed path from its parent node. Since Node C has a direct path to Node G, So Node G is the Child node.




10 - Question

Which node is the child node of the Node B in the following K-ary tree?
k-ary-tree-multiple-choice-questions-answers-mcqs-q5
a) A
b) C
c) B
d) No child node

View Answer

Answer: d
Explanation: Since Node B is the Leaf node of the above ternary tree and leaf node has no child node. So there is no child node for Node B in the above K-ary tree.




11 - Question

What is the depth of Node F in the given K-ary tree?
k-ary-tree-multiple-choice-questions-answers-mcqs-q6
a) 0
b) 1
c) 2
d) 3

View Answer

Answer: c
Explanation: Depth of the node is the length of the path from root to the node. Here, length of path from root to Node F is 2. So depth of Node F is 2.




12 - Question

What is the Height of the given K-ary tree?
k-ary-tree-multiple-choice-questions-answers-mcqs-q12
a) 0
b) 1
c) 2
d) 3

View Answer

Answer: c
Explanation: Height of the tree is defined as the length of the path from root node to the deepest node of the tree. Here deepest nodes are 5,6,7 which are at length 2. So the height of the K-ary tree is 2.

Get weekly updates about new MCQs and other posts by joining 18000+ community of active learners