Which of the following is the application of minimum ternary heap?

(a) Prim’s Algorithm

(b) Euclid’s Algorithm

(c) Eight Queen Puzzle

(d) Tree

Enquiry is from Ternary heap in section Heap of Data Structures & Algorithms I

I got this question during an interview.

1 Answers

The correct option is (a) Prim’s Algorithm

To explain: When working on the graph in the computer science field, the Prim’s Algorithm for spanning trees uses a minimum ternary heap as there are delete operation equal to a number of edges and decrease priority operation equal to the number of vertices associated with the graph.