Reservoir Sampling
      (samwho.dev)
Reservoir sampling is a technique for selecting a fair random sample when you don't know the size of the set you're sampling from.
    
  Reservoir sampling is a technique for selecting a fair random sample when you don't know the size of the set you're sampling from.