Building a Heap
Repeated Insertions
Worst case time O(n log n)
In practice O(n)
Good cache performance
Floyd’s Method
Worst case time O(n)
Poor cache performance
Previous slide
Next slide
Back to first slide
View graphic version