Which data structure would be the most appropriate to implement a priority queue?

  • Array
  • Binary Heap
  • Hash Table
  • Linked List
A binary heap is the most appropriate data structure to implement a priority queue because it allows efficient insertion and extraction of elements with logarithmic time complexity.
Add your answer
Loading...

Leave a comment

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