Heap Operations
2.1
2.5
6.3
3.0
8.9
10.0
2.1
2.5
6.3
3.0
8.9
10.0
5.2
2.1
2.5
5.2
3.0
8.9
10.0
6.3
(a) Enqueue (5.2)
2.1 2.5 6.3 3.0 8.9 10
2.1 2.5 6.3 3.0 8.9 10 5.2
2.1 2.5 5.2 3.0 8.9 10 6.3
2.1
2.5
5.2
3.0
8.9
10.0
6.3
2.1
2.5
6.3
3.0
8.9
10.0
5.2
2.1
2.5
6.3
3.0
8.9
10.0
2.1 2.5 5.2 3.0 8.9 10 6.3
2.1 2.5 6.3 3.0 8.9 10 5.2
2.1 2.5 6.3 3.0 8.9 10
(c) Cancel (6.3)
2.1
5.2
3.0
8.9
10.0
6.3
6.3
2.5
5.2
3.0
8.9
10.0
2.5
6.3
5.2
3.0
8.9
10.0
2.5
3.0
5.2
6.3
8.9
10.0
2.5
2.1 2.5 5.2 3.0 8.9 10 6.3
6.3 2.5 5.2 3.0 8.9 10
2.5 6.3 5.2 3.0 8.9 10
2.5 3.0 5.2 6.3 8.9 10
(b) Dequeue
Initial
Create last item
Bubble up item
Initial
Swap
Reorganize
Initial
Swap
Reorganize
Reorganize
Previous slide
Next slide
Back to first slide
View graphic version