# What is a ternary heap?

Category: QuestionsWhat is a ternary heap?
Editor">Editor Staff asked 5 months 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.

Editor">Editor Staff answered 5 months 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.

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17
Articles: 40701