News for hackers. Stuff that matters.
Re:Ask HN: Fast sampling and update of weighted items? (data... by Autre on Wednesday March 25, 2009 @03:21PM (#532279)
A priority queue [http://en.wikipedia.org/wiki/Priority_queue] seems to be the way to go with this.
Re:Ask HN: Fast sampling and update of weighted items? (data... by mjtokelly on Wednesday March 25, 2009 @03:23PM (#532287)
This would give you the maximum weighted item, but not a weighted probability distribution.