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 :)