Darts, Dice, and Coins: Sampling from a Discrete Distribution
keithschwarz.com