Hacker News new | ask | show | jobs
by finnh 407 days ago
ah, yes, the "memory is no object" way of obtaining a weighted distribution. If you need that sweet sweet O(1) selection time, maybe check out the Alias Method :)