One of n lines in a file: Difference between revisions

m
Line 1,910:
=={{header|Rust}}==
{{libheader|rand}}
You could also use `rand::seq::sample_iter` which uses the more general version of this algorithm, ReserviorReservoir Sampling: https://en.wikipedia.org/wiki/Reservoir_sampling.
<lang rust>extern crate rand;