reservoir-sampling Questions

4

Solved

To retrieve k random numbers from an array of undetermined size we use a technique called reservoir sampling. Can anybody briefly highlight how it happens with a sample code?
Paraguay asked 10/4, 2010 at 7:45

2

Solved

I'm fairly well acquainted with using Reservoir Sampling to sample from a set of undetermined length in a single pass over the data. One limitation of this approach, in my mind, is that it still re...
Alright asked 11/6, 2014 at 21:15

3

It was asked in relation to another question recently: Given an unknown length list, return a random item in it by scanning it only 1 time I know you shouldn't, I just can't put my finger on a can...
Wriest asked 2/1, 2012 at 16:42
1

© 2022 - 2024 — McMap. All rights reserved.