Heaps on heaps
log log n comparisons are necessary and sufficient to insert an element into a heap. (This improves the previous upper and lower bounds of log n and 0(1).)
log n+g(n)−ε(n) comparisons are necessary and sufficient to replace the maximum in a heap. (ε(n) denotes a function in the range [0,1]. This improves the previous upper and lower bounds of 2 log n and log n.)
1.625n+0(log n * g(n)) comparisons are sufficient to create a heap. 1.37 ... n comparisons are necessary not only in the worst case but also on the average.
KeywordsMaximum Element Binary Search Priority Queue Bottom Level Chain Element
Unable to display preview. Download preview PDF.
- [Floyd]R.W. Floyd, Algorithm 245, Treesort 3, CACM 7, 12 (Dec. 1964), 701.Google Scholar
- [Knuth]D.E. Knuth, The Art of Computer Programming, Vol. 3: Sorting and Searching, Addison-Wesley, 1973.Google Scholar
- [Williams]J.W.J. Williams, Algorithm 232, Heapsort, CACM 7, 6 (June 1964), 347–348.Google Scholar