A ________ is a data structure that can hold a collection of elements and allows for the retrieval of the smallest (or largest) element in constant time.

  • Array
  • Heap
  • Queue
  • Stack
A Heap is a data structure that can hold a collection of elements and allows for the retrieval of the smallest (or largest) element in constant time. This property makes heaps useful for priority queue implementations.
Add your answer
Loading...

Leave a comment

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