FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Fatal error!
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Fatal error! [message #180880 is a reply to message #180879] Sun, 24 March 2013 13:34 Go to previous message
Thomas Mlynarczyk is currently offline  Thomas Mlynarczyk
Messages: 131
Registered: September 2010
Karma:
Senior Member
Jerry Stuckle schrieb:
>> $data = range( 1, 100000 );
>> shuffle( $data );
> This would note create an array of random numbers. It will create a
> randomized array of numbers - two entirely different things.
> In a random array, duplicates are expected to happen. That's the nature
> of random numbers.

This is, of course, true, but I still consider my suggestion to be
sufficient for the OP's sorting exercise [1]. On the other hand: a few
duplicates might be useful to prove that the sorting algorithm can deal
with them.

Greetings,
Thomas

[1] The rand() function is -- like any deterministic algorithm -- not
truly random either.

--
Ce n'est pas parce qu'ils sont nombreux à avoir tort qu'ils ont raison!
(Coluche)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: question about class getters
Next Topic: Seeking help with relative and absolute paths
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 15:49:18 GMT 2024

Total time taken to generate the page: 0.03345 seconds