Time Complexity
Each step of a bubble up or bubble down takes O(1) time.
There are at most log2n steps in a bubble up or bubble down operation.
Insertion requires 1 bubble up. It’s O(log n)
DeleteMin requires 1 bubble down: It’s also O(log n)
Previous slide
Next slide
Back to first slide
View graphic version