Heaps and Priority Queues Questions
Binary heaps and priority queues for maintaining ordered access to the smallest or largest elements. Covers heapify, top-K selection, streaming medians via two-heap patterns, and merge-of-sorted-streams problems. Appears whenever a problem needs efficient repeated access to extremes without full sorting.
Implement or describe a priority-queue wrapper in Python or Go that supports an efficient decrease-key operation necessary for Dijkstra. Discuss practical implementation choices (indexed heap vs lazy insertion), memory/CPU tradeoffs, and concurrency concerns if the queue is accessed by multiple goroutines/threads in an SRE tool.
That is every published Heaps and Priority Queues question for Site Reliability Engineer (SRE) so far. Browse the other topics in this category, or practice this one interactively.