Reservoir-sampling algorithms of time complexity O ( n (1 + log( N / n ))) | Synapse