What is a ternary heap?

Category: QuestionsWhat is a ternary heap?
Editor">Editor Staff asked 4 weeks ago

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
 
The doubt is from Ternary Heap in portion Heap of Data Structures & Algorithms I
 
The question was asked in an interview for job.

1 Answers
Editor">Editor Staff answered 4 weeks ago

Right option is (d) Heap with all nodes having three children
 
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.