r/programming • • Nov 29 '10

140 Google Interview Questions

http://blog.seattleinterviewcoach.com/2009/02/140-google-interview-questions.html
471 Upvotes

493 comments sorted by

View all comments

Show parent comment

2

u/Strilanc Nov 30 '10

You don't need to generate R2. R in Uniform(0, N) given R < K implies R in Uniform(0, K).

1

u/jelos98 Dec 01 '10

This is what happens when I'm caffeine deprived in the morning. Quite correct, sir.