Insertion into a Heap
Insert (1, Jim): Begin by placing (1, Jim) in the next available leaf position. Then correct any violations of the min heap property by “bubbling” light elements up towards the root.
(2, Sue)
(5, Joe)
(9, Amy)
(9, Sam)
(1, Jim)
Previous slide
Next slide
Back to first slide
View graphic version