Sorting algorithms/Bogosort: Difference between revisions
Content deleted Content added
Walterpachl (talk | contribs) m →{{header|REXX}}: typo |
|||
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 |
<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. |