Priority Queue (PQ)(優先佇列)
範圍 — 僅作轉址。 本檔已併入 heap.md,留著只是為了把舊連結導向正確的章節。 另見:heap.md — 堆積與優先佇列的正式文件。
本檔已併入 heap.md。
優先佇列是抽象資料型別,二元堆積是它的實作方式。 拆成兩份檔案的結果,就是同一批題目(LC 215、23、253、295、347、378、621、703、373) 被解了兩次,一種語言一次。現在
heap.md兩邊都收。
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 |
另見
- heap.md — 堆積與優先佇列的正式文件
- Dijkstra.md — 以 PQ 為核心的最短路徑演算法
- monotonic_queue.md — 滑動視窗極值上,雙端佇列勝過堆積的時機
- streaming_algorithms.md — 串流上的 top-k