note 102704 rejected from function.array-rand by danbrown
| From: | danbrown@php.net | Date: | Tue, 01 Mar 2011 15:58:43 +0000 |
| Subject: | note 102704 rejected from function.array-rand by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-177450@lists.php.net to get a copy of this message | ||
Note Submitter: anilesh dot sharma at gmail dot com
----
Can anyone please suggest me a solution for the following?
I wish to develop a method which will randomly distribute 'n' objects to 'm'
containers.
To give a better feel, I want to distribute m coins among n(which is <m) people so that each gets
int(m/n) coins.
What is the fastest method which can be employed?