Quicksort is optimal for many equal keys

From MaRDI portal



Abstract: I prove that the average number of comparisons for median-of-k Quicksort (with fat-pivot a.k.a. three-way partitioning) is asymptotically only a constant alphak times worse than the lower bound for sorting random multisets with Omega(nvarepsilon) duplicates of each value (for any varepsilon>0). The constant is , which converges to 1 as koinfty, so Quicksort is asymptotically optimal for inputs with many duplicates. This resolves a conjecture by Sedgewick and Bentley (1999, 2002) and constitutes the first progress on the analysis of Quicksort with equal elements since Sedgewick's 1977 article.












This page was built for publication: Quicksort is optimal for many equal keys

Report a bug (only for logged in users!)Click here to report a bug for this page (MaRDI item Q5195100)