Skip to content

Latest commit

 

History

History
 
 

bogo_sort

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Bogo Sort

Also known as permutation sort, stupid sort, slowsort, shotgun sort or monkey sort, is a highly ineffective sorting function based on the generate and test paradigm. The function successively generates permutations of its input until it finds one that is sorted. It is not useful for sorting, but may be used for educational purposes, to contrast it with more efficient algorithms.

From Wikipedia: "An analogy for the working of [bogosort] is to sort a deck of cards by throwing the deck into the air, picking the cards up at random, and repeating the process until the deck is sorted."