Priority Queue (PQ)(優先佇列)

Trees & HeapsPriority 2 of 5 — Niche — read once, revisit only if a company is known to askNiche 更新於 Sep 18, 2026

範圍僅作轉址。 本檔已併入 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

另見