Sorting presorted files

Abstract

A new sorting algorithm is presented. Its running time is O(n(1+10g(F/n)) where F = I{(f,j); i < j and xi < xj}1 is the total number of inversions in the input sequence xn xn_1 xn_2 ... x2 xl• In other words, presorted sequences are sorted quickly, and completely unsorted sequences are sorted in O(n log n) steps. Note that F < n2/2 always. Furthermore, the constant of proportionality is fairly small and hence the sorting method is competitive with existing methods for not too large n

    Similar works