Sunday, November 21, 2010

How to select k sample nodes from a unknown sized linked list.?

http://en.wikipedia.org/wiki/Reservoir_sampling can be applied here. Is there any better solution for this problem?

Map reduce implementation of reservoir sampling is discussed in this blog post.
http://had00b.blogspot.in/2013/07/random-subset-in-mapreduce.html

No comments:

Post a Comment