4 ms·
After a good night's sleep I see that my second edit is in fact wrong and my intuition in the first sentence was right (and the code in my edit fell victim to t
by fhars 17y ago
After a good night's sleep I see that my second edit is in fact wrong and my intuition in the first sentence was right (and the code in my edit fell victim to the same off-by-one as the code in the article).
Final proof:
for my $i (1..1000000) {
my @a = (0..10);
my @b = shuffle(@a);
for $j (0..10) {
if ($b[$j] == $j) {
die "Criticism is wrong $i";
}
}
}