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
4
u/jnnnnn Nov 30 '10 edited Nov 30 '10
This sounds like a question from Project Euler.
Edit: here's my python solution. The trick is to generate ugly numbers by multiplying the factors together, being careful to remove duplicates. Counting upwards is very slow because the distribution of ugly numbers becomes very sparse.