Which of the following data structures is best suited for implementing a priority queue?
A binary heap is a tree-based data structure that is commonly used to implement priority queues . A binary heap allows efficient insertion of elements and extraction of the minimum or maximum element, depending on whether it is a min-heap or max-heap. Both operations take logarithmic time, making binary heaps optimal for scenarios where priority-based processing is needed, such as in scheduling algorithms or Dijkstra’s shortest path algorithm. A (Incorrect): A stack is a last-in, first-out (LIFO) structure, which is not suitable for maintaining element priorities. B (Incorrect): A queue is a first-in, first-out (FIFO) structure that processes elements in the order they arrive, without considering priority. C (Incorrect): A linked list could be used to implement a priority queue, but its performance would be less efficient than a binary heap, as it requires linear time for insertion and extraction. E (Incorrect): A hash table provides fast lookups but does not maintain any order, making it unsuitable for a priority queue.
________ happen when RBI desires that liquidity should be squeezed from the economy but Banks are not eager to deposit money with RBI at rate fixed by RBI.
Khadi and Village Industries Commission (KVIC) is an apex organisation under which Ministry?
Urjit Patel has been appointed as VP of AIIB for which of the following region?
What is the minimum paid-up capital requirement for a new bank in India as per RBI regulations?
Which is the weighted average of a country's currency against an index or basket of other relevant currencies?
To boost corporate governance norms, SEBI has notified rules introducing special rights to unitholders of REITs who can now nominate representatives on ...
Which of the following is not a Maharatna Central Public Sector Enterprises (CPSEs)?
Total members countries in Organization for Economic Cooperation and Development?
Which of the following becomes 1st country to purchase BrahMos Supersonic Cruise Missile System from India?
Which loan type typically requires collateral and is used for purchasing large assets?