note
Joost
I think you meant
<c>
swap(\$a[$i], \$a[$random]);
</c>
Which <em>looks</em> like it may work. But randomness always got me confused (and into furious rows with my math teacher, but that's another story).
<p>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-157432">
<em>[id://149675|"What should it profit a man, if he should win a flame war, yet lose his cool?"]</em>
</div></div>
695750
695755