Re: Randomly outputting an array
- From: Ico <usenet@xxxxxxx>
- Date: 14 Jul 2006 17:50:41 GMT
ryanarossi@xxxxxxxxx <ryanarossi@xxxxxxxxx> wrote:
What would be the simplest way to output an array in random order, but
every element in the array MUST be outputted and the elements cannot
repeat?
That depends on your definition of 'simplest' and 'random'. A simple -
but probably far from effective - method would be to just shuffle the
array some time by swapping random elements, and then print all the
elements in sequence.
--
:wq
^X^Cy^K^X^C^C^C^C
.
- References:
- Randomly outputting an array
- From: ryanarossi@xxxxxxxxx
- Randomly outputting an array
- Prev by Date: Randomly outputting an array
- Next by Date: Re: data structure question
- Previous by thread: Randomly outputting an array
- Next by thread: Re: Randomly outputting an array
- Index(es):
Relevant Pages
|