Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: Empty Elements

by MarkM (Curate)
on Jun 09, 2003 at 04:47 UTC ( #264239=note: print w/ replies, xml ) Need Help??

in reply to Empty Elements

I believe you intended your second last line to read:

$DECK[$_-1] = $i;

Note, however, that your algorithm wastes valuable entropy, and is inefficient. Wasted entropy can reduce the effective period of a rand() function. The inner loop could also, in theory, loop indefinately (although for the expected scenario, it would loop 100 times or less).

Comment on Re: Empty Elements
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2015-11-27 19:53 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (731 votes), past polls