Technical interview guide
Heaps / Priority Queues
A tree-shaped structure that keeps the min (or max) element accessible in O(1), with O(log n) insert and remove.
- Read
- 42 min
- Practice MCQs
- 25
- Interview QA
- 25
- Edition
- v7
- Editorial status
- Reviewed
Scope: Language-neutral, with library behaviour cited from CPython 3.14 heapq, the C++ standard containers, and java.util as of Java 21.
Curated: · Written: · Reviewed:
