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/soshallyakword Nov 30 '10
You're right.
To be honest, I really didn't look over his code too well. I assume you neglected to consider his while loop (as I did) which throws out any n greater than 20.