← Map
Level 9
· ◆◆◆ · ~11 min
Heaps and Priority Queues
Heaps and Priority Queues
"When you only ever want the extreme element, you do not need the collection sorted — and not sorting it is the whole saving."
the heap propertyan implicit tree in an arraypush, pop and peektop-k and streaming median
A short lesson, then a quiz. ❤️×3 — a wrong answer costs a heart; finish with at least one left and the level is yours. Lose all three and you'll have to try again. Replay any time — XP and cleared levels are never lost.