Which of the following data structures can be used to efficiently implement a…
2018
Which of the following data structures can be used to efficiently implement a priority queue?
- A.
Array
- B.
Single Linked List
- C.
Circular Linked List
- D.
Heap Tree
Attempted by 257 students.
Show answer & explanation
Correct answer: D
A Heap Tree is the optimal choice for implementing a priority queue. It supports insertion and extraction in O(log n) time, unlike arrays or linked lists which require O(n). This efficiency makes heaps the standard structure for priority management.