One of n lines in a file: Difference between revisions

m
no edit summary
mNo edit summary
Line 21:
 
Note: You may choose a smaller number of repetitions if necessary, but mention this up-front.
 
Note: This is a specific version of a Reservoir Sampling algorithm: https://en.wikipedia.org/wiki/Reservoir_sampling
<br><br>