Skip to content
Trees line

Heap / Priority Queue problems

A heap always hands back its smallest or largest item, and adding or removing one is fast. The problems keep the best k items, merge sorted streams, or pick the next most urgent job.

The 7 problems

In the order the app teaches them. Each page has the problem, five hints and the explained solution.

On the roadmap

Heap / Priority Queue is a station on the trees line. It builds on Tries. Next comes Advanced Graphs.

The roadmap says why each line runs in its order.

Patterns

5 patterns solve these problems. Naming them gives the problems’ methods away, so the list is folded.

Show the 5

Keep going