PATTERN 08 · 3 PROBLEMS
Heaps & ordered selection
Maintain only the boundary of what matters instead of sorting everything repeatedly.
Start the first lesson ↗MASTER KEYA heap exposes the next extreme, not the whole order.
0OF 3
RECALLED
RECALLED
The answer depends on counts, then selecting only k extremes.
Not started
↗02Top K Frequent Elements
The answer depends on counts, then selecting only k extremes.
Not started
↗03Merge K Sorted Lists
Only the current head of each list can be the next output node.
Not started
↗Find Median from Data Stream
Two heaps can keep the lower and upper halves balanced.