Skip to content

Heaps

Keep the most important thing on top — without sorting the rest.

Start the module

1. Heap Basics · 5 min

0 of 7 lessons · 0% complete

Start module

Heaps visualizer

Every lesson in this module opens with an animation you can step through. This is the first one — Heap Basics: Not sorted — just guaranteed to know its own winner.

Heap Basics

Step 1 of 25

Four bids in a plain array. Read as a tree, index i parents 2i+1 and 2i+2 — that arithmetic is the tree.

Lessons
7
Minutes
41
Problems
14
Concepts
6

Quiz yourself: 3 questions from this module

1 / 3

In a min-heap, what is guaranteed about the value at index 0?