Slowsort

Slowsort is a sorting algorithm.

It is a reluctant algorithm based on the principle of multiply and surrender (a parody formed by taking the opposites of divide and conquer).

It was published in 1984 by Andrei Broder and Jorge Stolfi in their paper "Pessimal Algorithms and Simplexity Analysis"[1] (a parody of optimal algorithms and complexity analysis).

This is an implementation in pseudocode: An unoptimized implementation in Haskell (purely functional) may look as follows: The runtime

A lower asymptotic bound for

Slowsort is therefore not in polynomial time.

Even the best case is worse than bubble sort.