CSCI2100 · Theorem · Chapter 3 · Priority queues
Logarithmic height and cost
2 steps of prerequisites below it
A heap with n ≥ 1 elements has height at most ⌊log₂ n⌋, so insertion and removal of a minimum make O(log n) swaps and comparisons.
Taught in
- 3.1 Binary min-heaps and priority queues · introduced
- 14.2 Weighted graph frontiers: Dijkstra and Prim · applied
Uses
- Binary min-heap · used in its proof, proof step 3.1
Used by
Everything this builds on, earliest first · 2 steps
Each step comes after its own prerequisites, so reading in this order never needs something you have not met. It is a reading order for these notes, not a diagnosis of what you know.
- Min-priority queue · 3.1
- Binary min-heap · 3.1
Possible roots and a review route need your own answers on these points. None are recorded yet, so none are suggested.
Longest chain down to a starting point
Each step is used by the one above it, across courses where the notes link them. It ends at a point the notes define without another point.