random cover of a range

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Fri Feb 13 17:30:14 PST 2009


bearophile wrote:
> Andrei Alexandrescu:
>> A quadratic algorithm applied to a fixed fraction of the input size will 
>> still yield quadratic behavior.
> 
> It's not quadratic, an in-place shuffling done right, by Knuth algorithm, is linear. I have a linear shuffling in my dlibs too.
> http://en.wikipedia.org/wiki/Shuffling

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

Andrei



More information about the Digitalmars-d mailing list