Heapsort—Adapted for presorted files
- Cite this paper as:
- Levcopoulos C., Petersson O. (1989) Heapsort—Adapted for presorted files. In: Dehne F., Sack J.R., Santoro N. (eds) Algorithms and Data Structures. WADS 1989. Lecture Notes in Computer Science, vol 382. Springer, Berlin, Heidelberg
We provide a new sorting algorithm which is optimal with respect to several known, and new, measures of presortedness. A new such measure, called Osc(X), measures the oscillation within the input data. The measure has an interesting application in the sweep-line technique in computational geometry. Our algorithm is based on a new approach which yields space efficiency and it uses simple data structures. For example, after a linear time preprocessing step, the only data structures used are a static tree and a heap.
Key wordssorting algorithm measures presortedness heap geometric interpretation optimality
Unable to display preview. Download preview PDF.