Question
Which of the following data structures is best suited
for implementing a priority queue?  ÂSolution
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. Â
A listed company did not appoint a woman director on its Board. During audit, you find non-compliance continuing for 6 months. What is implication?
In insurance accounting, what is "unearned premium"?
A company has issued non-convertible debentures. Which of the following is true?
The term âPrevious yearâ is defined under which section of Income Tax Act?
Which of the following is not a member ministry in the National Board for MSMEs?
From the following data calculate abnormal gain to be debited to process account.
Input introduced in process 1 = 2000 units
Output = 1900...
Goods worth Rs.100,000 taken by the owner for his personal use should be credited to:
A supply comprising of two or more supplies shall be treated as the supply of that particular supply that attracts the highest rate of tax.
_______ are denominated in GBP (Great Britain Pound) and issued in London. Issue proceeds can be used to fund UK operation.
Section 126 of the Indian Contract Act refers to: