in reply to Re: Re: random numberin thread random number
#splice is still O(n)
$array[$index] = $array[-1];
True. And that's a neat solution.
It would still be better to shuffle the array and simply pop the next one when you need it as was suggested at near the top of the thread.
Examine what is said, not who speaks.
Give me a lever long enough ...
Eppur si muove
Mr. Watson – Come here – I want you
Mary had a little lamb
That's one small step for a man ...
SCE to AUX
I think I'll stop here
Results (263 votes). Check out past polls.