Sorting algorithms/Bogosort: Difference between revisions

Content added Content deleted
m (→‎modified bogo sort: aligned a comment.)
(→‎{{header|PL/I}}: don't swap an element with itself (improvement taken from REXX))
Line 1,546:
Iterate;
u=rand(1,n);
Do Until v^=rand(1,n);u
v=rand(1,n);
End;
Temp=a(u);
a(u)=a(v);
Line 1,589 ⟶ 1,591:
1.0
333.0
444.4 </pre>
 
=={{header|PowerShell}}==