Engineering Questions with Answers - Multiple Choice Questions

Ternary Heap MCQ’s – 1

1 - Question

What is the smallest element of the given minimum ternary heap?

a) 1
b) 10
c) 18
d) 20

View Answer

Answer: a
Explanation: Ternary heap is a type of data structure in the field of computer science. It is a part of the Heap data structure family. Minimum ternary heap has the smallest element as its root node. The parent node is all either equal or less than children node in a minimum ternary heap.




2 - Question

What is the highest element of the given maximum ternary heap?

a) 31
b) 10
c) 18
d) 20

View Answer

Answer: a
Explanation: Ternary heap is a type of data structure in the field of computer science. It is a part of the Heap data structure family. Maximum ternary heap has the highest element as its root node. The parent node is all either equal or greater than children node in a maximum ternary heap.




3 - Question

What is the child of smallest element of the given minimum ternary heap?

a) 1
b) 10
c) 22
d) 24

View Answer

Answer: b
Explanation: Minimum ternary heap has the smallest element as its root node. The parent node is all either equal or less than children node in a minimum ternary heap. In the above minimum ternary heap, the smallest element is 1 and its children are 10, 18, 20.




4 - Question

What are the siblings of smallest element of the given maximum ternary heap?

a) 31
b) 12
c) 18
d) 22

View Answer

Answer: c
Explanation: Maximum ternary heap has the highest element as its root node. The parent node is all either equal or greater than children node in a maximum ternary heap. The smallest element in the maximum ternary heap is 10 and its siblings are 18, 20.




5 - Question

What is the height of a given minimum ternary heap?

a) 1
b) 10
c) 2
d) 24

View Answer

Answer: a
Explanation: Minimum ternary heap has the smallest element as its root node. The parent node is all either equal or less than children node in a minimum ternary heap. Height is the total length from the root node to the leaf node. So the height of the minimum ternary heap is 1.




6 - Question

What is the ancestor of the leaf node in a given minimum ternary heap?

a) 1
b) 10
c) 18
d) 20

View Answer

Answer: a
Explanation: Minimum ternary heap has the smallest element as its root node. The parent node is all either equal or less than children node in a minimum ternary heap. Ancestor is the node falling on the path from that node to the root node. So here ancestor of all leaf nodes is 1.




7 - Question

Which property should ternary heap hold for execution?
a) Associative
b) Commutative
c) Tree
d) Heap

View Answer

Answer: d
Explanation: Ternary heap is a type of data structure in the field of computer science. It is a part of the Heap data structure family. So, it should hold all the properties of Heap that is all the levels of the heap has to be filled from left to right.




8 - Question

Should leaves in ternary heap be distributed from left to right.
a) True
b) False

View Answer

Answer: a
Explanation: Ternary heap is a type of data structure in the field of computer science. It is a part of the Heap data structure family. So, it should hold all the properties of Heap that is all the levels of the heap has to be filled from left to right.




9 - Question

What is the process of building a ternary heap called?
a) Heapify
b) Hashing
c) Linking
d) Merging

View Answer

Answer: a
Explanation: Ternary heap is a type of data structure in the field of computer science. It is a part of the Heap data structure family. So, the process of building a ternary heap is known as Heapify.




10 - Question

 Which type of data structure is a ternary heap?
a) Array
b) Hash
c) Priority Queue
d) Priority Stack

View Answer

Answer: c
Explanation: Ternary heap is a type of data structure in the field of computer science. It is a part of the Heap data structure family. It is a priority queue type of data structure that follows all the property of heap.




11 - Question

 Is the priority queue abstract data type.
a) True
b) False

View Answer

Answer: a
Explanation: Priority queue is an abstract data type. It is also the extension of the Queue data structure where all the elements have been assigned some priority and on the basis of this priority, the elements are dequeued from the structure.




12 - Question

What is a ternary heap?
a) An array with three elements
b) Linked list with three elements
c) Tree with three children
d) Heap with all nodes having three children

View Answer

Answer: d
Explanation: Ternary heap is a type of data structure in the field of computer science. It is a part of the Heap data structure family. So, it follows all the property of heap. Therefore, all the nodes in the ternary heap have 3 nodes.




13 - Question

Who invented d-ary heap?
a) Carl Rick
b) Alan Turing
c) Donald Johnson
d) Euclid

View Answer

Answer: c
Explanation: Ternary heap is a type of data structure in the field of computer science. It is a part of the Heap data structure family. The d-ary heap was invented by Donald Johnson in the year 1975.

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