stooge sort


Definition: A terribly inefficient sort algorithm that swaps the top and bottom items if needed, then (recursively) sorts the bottom two-thirds, then the top two-thirds, then the bottom two-thirds again.

See also bozo sort, bogosort, lucky sort.

Author: PEB


Pat Morin's implementation (Java). (Python).

More information

Stooge sort illustrated and stooge sort vs bubble sort.
Bogo sort vs. stooge sort race.

Go to the Dictionary of Algorithms and Data Structures home page.

If you have suggestions, corrections, or comments, please get in touch with Paul Black.

Entry modified 5 April 2023.
HTML page formatted Wed Apr 5 13:02:12 2023.

Cite this as:
Paul E. Black, "stooge sort", in Dictionary of Algorithms and Data Structures [online], Paul E. Black, ed. 5 April 2023. (accessed TODAY) Available from: