Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Random Derangement Of An Array

by Joost (Canon)
on Jul 05, 2008 at 22:03 UTC ( #695757=note: print w/replies, xml ) Need Help??


in reply to Re: Random Derangement Of An Array
in thread Random Derangement Of An Array

I think you meant
swap(\$a[$i], \$a[$random]);
Which looks like it may work. But randomness always got me confused (and into furious rows with my math teacher, but that's another story).

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2021-03-03 12:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favorite kind of desktop background is:











    Results (78 votes). Check out past polls.

    Notices?