Binary heap
A row of numbers read as a tree, with the smallest always on top. A new number goes at the end of the row and climbs while it is smaller than the number above it; taking one out takes the top, moves the last number up, and lets it sink back down.
- comparisons
- 0
- swaps
- 0
step 1 of 1
Examples