Preprints, Working Papers, ... Year : 2015

Merge Strategies: from Merge Sort to TimSort

Abstract

The introduction of TimSort as the standard algorithm for sorting in Java and Python questions the generally accepted idea that merge algorithms are not competitive for sorting in practice. In an at- tempt to better understand TimSort algorithm, we define a framework to study the merging cost of sorting algorithms that relies on merges of monotonic subsequences of the input. We design a simpler yet competi- tive algorithm in the spirit of TimSort based on the same kind of ideas. As a benefit, our framework allows to establish the announced running time of TimSort, that is, O(n log n).
Fichier principal
Vignette du fichier
merge_strategies.pdf (330.95 Ko) Télécharger le fichier
Origin Files produced by the author(s)
Loading...

Dates and versions

hal-01212839 , version 1 (07-10-2015)
hal-01212839 , version 2 (09-12-2015)

Identifiers

  • HAL Id : hal-01212839 , version 2

Cite

Nicolas Auger, Cyril Nicaud, Carine Pivoteau. Merge Strategies: from Merge Sort to TimSort. 2015. ⟨hal-01212839v2⟩
6145 View
5930 Download

Share

More