_________ is a data structure that provides constant-time access to the minimum or maximum element.

  • Heap
  • Linked List
  • Queue
  • Stack
A Heap is a specialized tree-based data structure that satisfies the heap property. Heaps are commonly used to implement priority queues, where elements with higher priority are dequeued before those with lower priority. The key feature of a heap is that it allows constant-time access to the minimum (or maximum) element, making it efficient for applications where quick access to extreme values is required. Heaps are often used in algorithms like Dijkstra's Algorithm and Prim's Algorithm.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *