Silly Sort

last modified: April 21, 2004

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


Loading...