random cover of a range

bearophile bearophileHUGS at lycos.com
Fri Feb 13 17:39:40 PST 2009


Andrei Alexandrescu:
> Well we were discussing how to tackle the algorithm that does not touch 
> the original array/range.

What I have said so far applies still: at the end instead of copying the remaining 10% of the items, create an array of the indexes of those 10%, and then shuffle that.

Bye,
bearophile



More information about the Digitalmars-d mailing list