Skip to main content
Toggle menu
OpenDocs
Search docs...
Search...
Ctrl
K
Search
Clone on GitHub
Collection
buttondown
OpenDocs collection generated from the buttondown tag.
Floyd's Sampling Algorithm • Buttondown
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,...