An optimal algorithm for bounded random integers | Hacker News Reader