In this paper we study greedy in-place sorting algorithms which miraculously
happen to work in reasonable time. Dumb-Sort which repeatedly compares all
possible pairs of array cells sorts n elements in
n − 1 cycles, or time O(n3).
Not-So-Dumb-Sort, which only tests adjacent cells, also sorts in
n − 1 cycles, or in time O(n2).
Guess-Sort, a randomized version of Dumb-Sort, runs in expected time
O(n2 log n). And Fun-Sort, an
in-place variant of Insertion-Sort that performs repeated insertions by binary
search into an initially unsorted array, sorts in time
O(n2 log n).