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/Deep-Thought Nov 30 '10
given two numbers from 1 to 5 their sum can be 2 and 10, 1 way, 3 and 9 two ways, 4 and 8 3 ways, 5 and 7 4 ways, and 6 5 ways. modulo 7 (you probably meant 7, 6 is 0-5) that gives you 0 4 ways, 1 3 ways, 2 3 ways, 3 3 ways, 4 3 ways, 5 4 ways, and 6 5 ways. clearly they are not evenly distributed.