Sorting algorithms/Bogosort: Difference between revisions

Content added Content deleted
Line 1,560: Line 1,560:
This is a modified bogo sort.
This is a modified bogo sort.
<br><br>To verify the array is in order, a sequential search is performed.
<br><br>To verify the array is in order, a sequential search is performed.
<br>When an number is found out of order, two random numbers between
<br>When a number is found out of order, two random numbers between
the first number's position and the the position of the last number
the first number's position and the the position of the last number
checked are swapped.
checked are swapped.