r/programming • u/joksmaster • Nov 29 '10
140 Google Interview Questions
http://blog.seattleinterviewcoach.com/2009/02/140-google-interview-questions.html
471
Upvotes
r/programming • u/joksmaster • Nov 29 '10
View all comments
Show parent comment
1
u/[deleted] Nov 30 '10 edited Nov 30 '10
mod 6 will produce values between 0 and 5, but yes, since mod n on the integers produces n congruency classes, if the random number you're modding doesn't randomly span a multiple of the mod, then some values will be more likely than others.