Which data structure is best for implementing a priority queue?

BPSC Past Papers / All — Multiple-choice practice

ترجیحی قطار کو نافذ کرنے کے لئے کون سا ڈیٹا ڈھانچہ بہترین ہے؟

  1. A. Hash Table
  2. B. Heap
  3. C. None of these
  4. D. Stack

Correct answer

Heap

Explanation

Explanation A heap efficiently supports priority queue operations like insertion and extraction of the highest (or lowest) priority element . Common types include min-heap and max-heap , which maintain the heap property for fast access to priority elements.

Continue with All MCQs, explore all BPSC Past Papers topics, or try the All practice quiz.

More All questions

Found an error? Report a correction with this page URL and a supporting source.