Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #8816
| From | Thomas Mlynarczyk <thomas@mlynarczyk-webdesign.de> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: Fatal error! |
| Date | 2013-03-24 14:34 +0100 |
| Organization | albasani.net |
| Message-ID | <kimvcc$4a1$1@news.albasani.net> (permalink) |
| References | <514ed8b4$0$37122$4fafbaef@reader1.news.tin.it> <kimtdj$a4$1@news.albasani.net> <kimtj1$eka$1@dont-email.me> |
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)
Back to comp.lang.php | Previous | Next — Previous in thread | Find similar | Unroll thread
Fatal error! gb <no@yahoo.it> - 2013-03-24 11:43 +0100
Re: Fatal error! Jerry Stuckle <jstucklex@attglobal.net> - 2013-03-24 08:04 -0400
Re: Fatal error! Thomas Mlynarczyk <thomas@mlynarczyk-webdesign.de> - 2013-03-24 14:00 +0100
Re: Fatal error! Jerry Stuckle <jstucklex@attglobal.net> - 2013-03-24 09:05 -0400
Re: Fatal error! Thomas Mlynarczyk <thomas@mlynarczyk-webdesign.de> - 2013-03-24 14:34 +0100
csiph-web