Priority Queue → see Heap

Trees & HeapsPriority 2 of 5 — Niche — read once, revisit only if a company is known to askNicheredirect Updated Sep 18, 2026

ScopeRedirect 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.md now 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