Elsevier

Theoretical Computer Science

Volume 118, Issue 1, 13 September 1993, Pages 81-98
Theoretical Computer Science

BOTTOM-UP-HEAPSORT, a new variant of HEAPSORT beating, on an average, QUICKSORT (if n is not very small)

https://doi.org/10.1016/0304-3975(93)90364-YGet rights and content
Under an Elsevier user license
open archive

Abstract

A variant of HEAPSORT, called BOTTOM-UP-HEAPSORT, is presented. It is based on a new reheap procedure. This sequential sorting algorithm is easy to implement and beats, on an average, QUICKSORT if n⩾400 and a clever version of QUICKSORT (where the split object is the median of 3 randomly chosen objects) if n⩾16000. The worst-case number of comparisons is bounded by 1.5n log n+O(n). Moreover, the new reheap procedure improves the delete procedure for the heap data structure for all n.

Cited by (0)

Supported in part by DFG grant We 1066-2/2.