Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: rand + shift || pop

by davies (Monsignor)
on Dec 22, 2010 at 15:54 UTC ( [id://878576]=note: print w/replies, xml ) Need Help??


in reply to Re: rand + shift || pop
in thread rand + shift || pop

If the array is being used as a grab bag and order doesn't matter, you could use the "pack of cards" algorithm I mentioned in Re: getting random number 8 times never the same and Re: Random data generation..

Regards,

John Davies

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2025-07-07 22:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.