On 1/16/06, Clark Christensen <[EMAIL PROTECTED]> wrote: > > So, I have to ask, is this the right way to implement such functionality? Is > there a better, or more efficient way?
The standard method of ordering a list randomly that doesn't return duplicates is to add a column for each of the items. Assign a random number to the column. The return the list sorted by the random number. It's used extensively for shuffling cards, etc. You should be aware that the standard random number functions of most languages return the same sequence of results for the same 'seed' value. So you generally have to do something like set the seed using the current clock so you get a different set of random numbers for each run of your program.

