Which data structure is best for implementing a priority queue?
BPSC Past Papers / All — Multiple-choice practice
ترجیحی قطار کو نافذ کرنے کے لئے کون سا ڈیٹا ڈھانچہ بہترین ہے؟
- A. Hash Table
- B. Heap
- C. None of these
- 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
- Which of the following is an equivalence relation? Transitive, Reflexive, Symmetric, All of them
- If production in factories rises sharply, pressure on which energy-consuming sector increases most directly?
- which of the following vitamin is produced in human body with the help of Sunlight.?
- The smaller particles of ash and dust may be blown by wind and spread over large areas in layers they become hardened into rocks that are called ______?
- Which element is most responsible for temperature extremes in Pakistan?
- Why are high-voltage direct current (HVDC) transmission systems preferred for long-distance power transmission?
Found an error? Report a correction with this page URL and a supporting source.