Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Random Derangement Of An Array

by dcturner (Initiate)
on Dec 04, 2008 at 19:54 UTC ( #728077=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
    }
    
    printf "Total %d (%d runs)\n", (scalar keys %f), $c;
    
  2. or download this
    $ ./derangements.pl 4
    2,3,0,1: 11.08% (expected -0.03%)
    ...
    3,2,1,0: 11.13% (expected +0.02%)
    3,2,0,1: 11.14% (expected +0.03%)
    Total 9 (1000000 runs)
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2021-02-28 03:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?