Heap / Priority Queue
Top-k selection, streaming medians, quickselect, and repeated take-the-best scheduling.
0 of 7 lessons complete · 129 min total
- Heaps: The Repeated-Best MachineThe array-backed binary heap, size-k min-heaps for top-k, and the 'repeatedly extract min/max' signal in scheduling and merging problems.Lesson · 16 minNot completed
- Bubble-Up / Sink-DownThe tree and its backing array move together.Animation · 10 minNot completed
- Two Heaps: The Balance ScaleA running median from a max-heap and min-heap kept in balance.Animation · 10 minNot completed
- Quickselect: One Order Statistic in O(n)When you need only the kth element, partitioning beats sorting.Animation · 10 minNot completed
- Practice: Top-K FundamentalsSize-k heaps, max-heap simulation, distance heaps, and heap-vs-quickselect choices.easy×2medium×24 problems · 0 solvedPractice · 35 minNot completed
- Practice: Scheduling & StreamsCooldown scheduling, merging followees' feeds, and the two-heap median.medium×2hard3 problems · 0 solvedPractice · 40 minNot completed
- Heap CheckpointMin vs max heap choice, size-k maintenance, two-heap balancing, and quickselect trade-offs.Checkpoint · 8 minNot completed