Bogosort Overview:

The Bogosort sorting algorithm functions by checking if a list is ordered, and if it isn't randomizing the order of the elements inside until the list is sorted.

  1. Check if list is ordered, if so return ordered list
  2. Randomize list
  3. Repeat

Diagram:

Algorithm Example:

Assuming the starting array is as follows

A possible sorting of this array into descending order by Bogosort may look like this:

More information!