Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The OP should have mentioned that it's this algorithm:

https://en.wikipedia.org/wiki/Reservoir_sampling

IMO it's a lot clearer if it's not in Perl ...

The pseudocode in Wikipedia also avoids division.



IMO it’s a lot clearer if it’s not in Perl

What isn’t?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: