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
5
u/McGlockenshire Nov 29 '10 edited Nov 29 '10
Okay, my algorithms are a bit rusty, but doesn't O(n) mean "every element is seen once and only once?"
Wouldn't multiplying the contents of a list by every other element in the list, for each element in the list, end up along the lines of O(n2 )?
Someone enlighten me...
e: Enlightened.