[OT] Algorithm question

Andrea Fontana via Digitalmars-d digitalmars-d at puremagic.com
Mon May 1 05:38:32 PDT 2017


On Monday, 1 May 2017 at 12:31:48 UTC, Andrea Fontana wrote:
> If you find an element that doesn't satisfy P(x) move it on top 
> of array (swap!) and then try again with uniform(1, r.length - 
> 1) and so on.


Whoops i mean uniform(1, r.length) of course :)


More information about the Digitalmars-d mailing list