← PATTERN ATLAS
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
RECOGNITION SIGNAL

The answer depends on counts, then selecting only k extremes.

01
Not started

Top K Frequent Elements

The answer depends on counts, then selecting only k extremes.

↗
02
Not started

Merge K Sorted Lists

Only the current head of each list can be the next output node.

↗
03
Not started

Find Median from Data Stream

Two heaps can keep the lower and upper halves balanced.

↗