Finally, what affect does that re-pick have upon the fairness of the shuffle?
Shuffling a previously fairly shuffled array should be as fair as shuffling the original. Right?
What makes it unfair is the my $r = rand ($j);. It slightly favours anything preceding $animal in the array to shuffle.
In reply to Re^7: Array problem
by ikegami
in thread Array problem
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |