Get the latest tech news

Floyd's Sampling Algorithm


I love sampling algorithms. Here's the sampling algorithm that I find most magical. We want to generate a subset of {1, 2, ..., n} of size k. def floyd(n,...

None

Get the Android app

Or read this on Hacker News