Engineering Questions with Answers - Multiple Choice Questions

Home » MCQs » Chemical Engineering » Ternary Heap MCQ’s – 1

# Ternary Heap MCQ’s – 1

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.