Priority Queue → see Heap
Scope — Redirect only. This file has been merged into heap.md; it exists to point old links at the right sections. See also: heap.md — the canonical doc for heaps and priority queues.
This file has been merged into heap.md.
A priority queue is the abstract data type; a binary heap is how it is implemented. Keeping them in two files meant the same problems (LC 215, 23, 253, 295, 347, 378, 621, 703, 373) were solved twice, once per language.
heap.mdnow holds both sides.
Where things went
| You were looking for | Now in |
|---|---|
| PQ problem patterns 1–8 | heap.md → Problem Categories |
Java PriorityQueue templates 1–12 |
heap.md → Java Template Library — paired with the Python templates |
Python heapq templates |
heap.md → Specific Pattern Templates |
PriorityQueue API / peek without popping |
heap_language_apis.md — the full API reference; heap.md → Language APIs keeps the one-screen table |
| Classic LC problems with Java solutions | heap_examples.md → LC Examples |
| PQ pattern → problem mapping | heap.md → Decision Table |
| Greedy + PQ scheduling (LC 1353 Max Events, and why the LC 253 sweep does not transfer) | heap_examples.md → LC 1353 — core idea, pattern table, similar LC; heap.md → Pattern 5 for the one-line signature |
See also
- heap.md — canonical doc for heaps and priority queues
- Dijkstra.md — the PQ-based shortest path algorithm
- monotonic_queue.md — when a deque beats a heap for sliding-window extrema
- streaming_algorithms.md — top-k over a stream