Silly Sort

An example of MultiplyAndSurrender, the opposite of DivideAndConquer. It shows how to do recursion in a wrong, expensive way.

Sort the first half, then sort the second half. When the two halves are sorted, use BubbleSort to finish sorting the complete array.

A much, much better example is the BogoSort.

Or SlowSort


See SortingAlgorithms


EditText of this page (last edited April 21, 2004) or FindPage with title or text search