This set of Data Structures & Algorithms Multiple Choice Questions & Answers (MCQs) focuses on “Ternary Heap”.

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

a) 1

b) 10

c) 18

d) 20

View Answer

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. What is the highest element of the given maximum ternary heap?

a) 31

b) 10

c) 18

d) 20

View Answer

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. What is the child of smallest element of the given minimum ternary heap?

a) 1

b) 10

c) 22

d) 24

View Answer

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. What are the siblings of smallest element of the given maximum ternary heap?

a) 31

b) 12

c) 18

d) 22

View Answer

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. What is the height of a given minimum ternary heap?

a) 1

b) 10

c) 2

d) 24

View Answer

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. What is the ancestor of the leaf node in a given minimum ternary heap?

a) 1

b) 10

c) 18

d) 20

View Answer

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. Which property should ternary heap hold for execution?

a) Associative

b) Commutative

c) Tree

d) Heap

View Answer

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. Should leaves in ternary heap be distributed from left to right.

a) True

b) False

View Answer

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. What is the process of building a ternary heap called?

a) Heapify

b) Hashing

c) Linking

d) Merging

View Answer

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. Which type of data structure is a ternary heap?

a) Array

b) Hash

c) Priority Queue

d) Priority Stack

View Answer

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. Is the priority queue abstract data type.

a) True

b) False

View Answer

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. 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

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. Who invented d-ary heap?

a) Carl Rick

b) Alan Turing

c) Donald Johnson

d) Euclid

View Answer

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.

**More MCQs on Ternary Heap:**

**Sanfoundry Global Education & Learning Series – Data Structure.**

To practice all areas of Data Structure, __here is complete set of 1000+ Multiple Choice Questions and Answers__.

**If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]**

**Related Posts:**

- Practice Programming MCQs
- Check Data Structure Books
- Check Programming Books
- Practice Computer Science MCQs
- Practice Design & Analysis of Algorithms MCQ