AlgoViz

Two heaps

medium 22 min

The two heaps pattern keeps a max-heap for the smaller half of the values and a min-heap for the larger half.

Check yourself

One question at a time. Each answer explains why.

Question 1 of 10

Score 0
conceptual

What does the max-heap store in the two heaps pattern?

Pick an answer to see why.

Flashcards

Say your answer, then reveal it.

Card 1 of 11

Recall

Which heap holds the smaller half, and why that kind?

Say your answer, then reveal it.

These cards come back in Today, just before you would forget them.