Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Fisher-Yates theory... does this prove that it is invalid?

by adrianh (Chancellor)
on Jul 25, 2003 at 01:58 UTC ( [id://277773]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub fisher_yates_shuffle {
        my $deck = shift;  # $deck is a reference to an array
    ...
            @$deck[$i,$j] = @$deck[$j,$i];
        }
    }
    
  2. or download this
    sub fixed_fisher_yates_shuffle {
        my ($deck, $rand) = @_;
    ...
    foreach my $key (sort keys %count) {
        print $key, " = ", $count{$key}, "\n";
    };
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://277773]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-16 18:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found