random cover of a range

bearophile bearophileHUGS at lycos.com
Fri Feb 13 17:28:12 PST 2009


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
(And my name is bearophile, thank you).

Bye,
bearophile



More information about the Digitalmars-d mailing list