Algorithms Every Programmer Should Know: Reservoir Sampling
I wrote and annotated a small RubyGem to explain the math behind reservoir sampling.
If you’ve ever wondered about the most efficient way to sample from an ActiveRecord query, this post is for you.
Post a comment