Comment

Comment by unsupported

Reservoir sampling or Algorithm R. It allows you to randomly choose a sample of k items (with equal probability) from an "infinite" stream of items. At first it sounds impossible, but the solution and proof are extremely simple and elegant.
parent unsupported 8 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton