In-Place Sorting With Fewer Moves

Abstract

. It is shown that an array of n elements can be sorted using O(1) extra space, O(n log n= log log n) element moves, and n log 2 n+O(n log log n) comparisons. This is the first in-place sorting algorithm requiring o(n log n) moves in the worst case while guaranteeing O(n log n) comparisons, but due to the constant factors involved the algorithm is predominantly of theoretical interest. Keywords. In-place algorithms, sorting, merging, mergesort, multiway merge. 1. Introduction In array sorting we are given an array of n elements, each consisting of a key and some information associated with that key, and the task is to reorder these in ascending order according to their keys. To carry out the sorting we assume that the only operations allowed for the elements are key comparisons and element moves. Moreover, we want to perform the sorting in-place, i.e., we assume that besides the input array there is a constant number of memory locations available for storing elements and a constant n..

    Similar works