A brainteaser is something like "A man pushed his car to a hotel and lost his fortune. What happened?" That's a brainteaser -- and nothing Google would ask.
So, do I get the job?
This boggles my mind. Where? For what purpose? Is the expectation that the candidate googles that question?
I would google lots of different things until I found some answers (car manufacturers sales reports from car magazines, news articles that may have the answer, literally for the phrase "number of cars sold in a year" etc, etc).
If you want me to talk through it, it's just mind numbing making asinine assumptions. Market sizing? Obvious assumptions? What?
I can't understand how anyone can say with a straight face that that question is straight forward and not ambiguous.
The ambiguity is what makes these google interview questions brain teasers, to me at least.
But that's probably the last item in a list of reasons why Google wouldn't hire me :)
The point is not to get the right answer. It's to deduce a reasonable answer that's in the right ballpark.
How did he do it?
Consider the Wolfram Alpha engieer who implemented the same feature.
How did she do it?
(It becomes an interesting question, eh?)
It's so ambiguous at the google search engine can't answer it.
Usually for this type of questions you don't really even need to say the numbers, just clearly outline your though process.
What does a user mean if they enter [how many cars sold in a year?]
The ambiguity shows that the specific answer is less interesting than showing your working; having the discussion about how to get an answer.
I wonder what internal Google has explored along the lines of prompting the user with clarifying questions. Like Google Suggest and Spell Check exhibit the level of intelligence needed I think.
Some coding questions as asked in interviews are actually riddles in practice because the interviewer is unskilled. Those 'coding questions' are worse than the obviously bad riddles because it is harder to tell that the feedback is slanted.
Took the interviewer a while but they finally figured it out.
So if 1000 cars are sold in a year, maybe he'll see plate #267 from Year 0, and plate #1796 from Year 2. 1800 - 300 / 2 = 750 cars per year, close enough.