Re: can this code be improved
- From: "Daniel Dyer" <dan@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 18 Aug 2006 01:32:46 +0100
On Thu, 17 Aug 2006 06:15:51 +0100, Patricia Shanahan <pats@xxxxxxx> wrote:
Why not run Fisher-Yates for 6 iterations, and then pick up the
first 6 elements of the array?
OK, but if you are going to generate 6 random numbers between 1 and 49 in order to decide which elements to swap, why not just use those random numbers as your selected lottery numbers?
Dan.
--
Daniel Dyer
http://www.dandyer.co.uk
.
- Follow-Ups:
- Re: can this code be improved
- From: Patricia Shanahan
- Re: can this code be improved
- References:
- can this code be improved
- From: Print Guy
- Re: can this code be improved
- From: Patricia Shanahan
- can this code be improved
- Prev by Date: Re: can this code be improved
- Next by Date: Re: unable to run servlet in Apache Tomcat/5.5.17
- Previous by thread: Re: can this code be improved
- Next by thread: Re: can this code be improved
- Index(es):
Relevant Pages
|