Re:Algorithms Every Programmer Should Know: Reservoir Sampling
by seivan on Friday March 06, 2015 @04:20PM
(#9159633)
My first solution would have been getting a count, maybe a cached count and just doing random between 0 and that count, fetching by index?
Or if you want more than one, just get a slice? Probably not the best, but at the top of my head.
[ Parent
| on HN ]
There are no comments on this comment yet.