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
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
bids
7
3
9
1
01234
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