Sorting algorithms/Bogosort: Difference between revisions

m
→‎modified bogo sort: uploaded modified bogo sort with the updated version.
(→‎{{header|PL/I}}: don't swap an element with itself (improvement taken from REXX))
m (→‎modified bogo sort: uploaded modified bogo sort with the updated version.)
Line 1,846:
if @.k>=? then iterate /*is this # in order? Get next. */
/*get 2 unique random #s for swap*/
do until a\==b; a=random(1j, #k); b=random(1j, #k); end
 
parse value @.a @.b with @.b @.a /*swap 2 random #s in array.*/