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.

Explain your choices

Answer first. Then compare your reasoning.

12 questions 0 got it 0 to review12 not marked