2 ms·
you probably don't even need 2. If your select with a random number N returns null then increment to N+1 and select again. You'll find one eventually.
by chasd00 3y ago
you probably don't even need 2. If your select with a random number N returns null then increment to N+1 and select again. You'll find one eventually.
- jprete 3y agoI think that’s got a similar bias as the original, unfortunately. All deleted indices between K and N (K<N) will result in picking N, and the number of such deletions would vary wildly between individual articles.