Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I had an interview question once which went...

Interviewer: "Could you tell me how many people will eat curry for their dinner this evening" Me: "Er, sorry?" Interviewer: "Not the actual number just an estimate"

I actually started to stumble my way through it, when I stopped and questioned what it had to do with anything about the job. The interviewer mumbled something and moved on.

I guess the question is, what is the point in the ridiculous questions? I just don't understand why they started coming up with these things.

share|improve this question

closed as primarily opinion-based by gnat, MichaelT, Bart van Ingen Schenau, GlenH7, World Engineer Mar 17 at 13:16

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

This sounds like a cargo cult application of a Fermi problem, specifically the piano tuner problem. As an aside, it burst my bubble to see NASA using Comic Sans (shudder). –  Mark C Sep 30 '10 at 2:20
I often ask this type of overly broad question during interviews. This is overly broad on purpose. –  deadalnix Apr 13 '12 at 12:14
it's about ability to provide reasonable guesstimates (vide en.wikipedia.org/wiki/Guesstimate) –  vartec Apr 13 '12 at 12:15
did you get the job? –  Billjk Apr 13 '12 at 13:13
I guess I'd tell the interviewer that this question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. –  Tom Aug 8 '12 at 19:55

7 Answers 7

up vote 40 down vote accepted

The question is there to see how you would solve it. It's meant to test your ability to think on your feet as well as gain some insight into your problem solving methodology.

Basically, they're looking for you to start talking your way through the problem:

  1. Come up with a list of reasonable givens (e.g. the size of the population, how much curry a person can eat, etc.)
  2. Derive a way to figure out the unknowns (e.g. how popular is curry, is the night special)
  3. Come up with a reasonable answer based on (1) and (2).
share|improve this answer
Nitpick : Why is "how much curry a person can eat" a necessary metric while estimating the answer? –  talonx Sep 25 '10 at 5:30
@talonx - perhaps some ate a bowl for breakfast and cannot possibly eat 2 bowls in one day :_) –  orokusaki Sep 26 '10 at 20:59
How do these questions fare if you come from a culture where curry is not that known? (For example, before googling it I wasn't sure exactly which countries curry is popular in at all? It is not a typical european dish, and although I've heard of it - that's all it was. I've never "investigated" it, even slightly). –  Rook Jul 14 '11 at 18:13
@Rook, it is precisely the same. The idea here is to deal with unknowns. The Drake equation is a perfect example of this. When it was formulated we could barely approach any of the variables, now we can approach some better (though many are still pretty much very unknown..). –  Eoin Carroll Apr 13 '12 at 12:02

You can thank Microsoft for that. Bill Gates has a fascination with puzzles, and that led Microsoft to use puzzles as interview questions. Sometime within the past decade, Microsoft realized that an interviewee's ability to solve puzzles has nothing to do with their ability to be a good programmer, so they stopped. Some people haven't caught up yet.

Some people say that it's about how you approach the problem, but I'm not really convinced that it tells you anything important.

share|improve this answer
Actually you can thank Enrico Fermi –  Martin Beckett Apr 13 '12 at 16:01

Look like a Fermi Question

a Fermi problem, Fermi question, or Fermi estimate is an estimation problem designed to teach dimensional analysis, approximation, and the importance of clearly identifying one's assumptions. Named after physicist Enrico Fermi, such problems typically involve making justified guesses about quantities that seem impossible to compute given limited available information.

The classic Fermi problem, generally attributed to Fermi, is "How many piano tuners are there in Chicago?" A typical solution to this problem would involve multiplying together a series of estimates that would yield the correct answer if the estimates were correct. For example, we might make the following assumptions:

  1. There are approximately 5,000,000 people living in Chicago.
  2. On average, there are two persons in each household in Chicago.
  3. Roughly one household in twenty has a piano that is tuned regularly.
  4. Pianos that are tuned regularly are tuned on average about once per year.
  5. It takes a piano tuner about two hours to tune a piano, including travel time.
  6. Each piano tuner works eight hours in a day, five days in a week, and 50 weeks in a year.

From these assumptions we can compute that the number of piano tunings in a single year in Chicago is

  • (5,000,000 persons in Chicago) / (2 persons/household) × (1 piano/20 households) × (1 piano tuning per piano per year) = 125,000 piano tunings per year in Chicago.

We can similarly calculate that the average piano tuner performs

  • (50 weeks/year)×(5 days/week)×(8 hours/day)/(2 hours to tune a piano) = 1000 piano tunings per year per piano tuner.

Dividing gives

  • (125,000 piano tunings per year in Chicago) / (1000 piano tunings per year per piano tuner) = 125 piano tuners in Chicago.
share|improve this answer
When you're in the middle of an interview, how can you possibly arrive at any of those numbers? I have no idea how many people, households, pianos, and tunings take place in Chicago -- not a one, and if one of those numbers is even a little off your answer will be thrown off significantly. –  Explosion Pills Apr 13 '12 at 13:26
@tandu It's the same thing when those kind of question are asked in an exam, but the important part is the approach, not the final result. You could plug better number when you got a better approximation of the variables. –  DavRob60 Apr 13 '12 at 13:32
@DavRob60 The approach of making up numbers is itself faulty - not only is it almost certainly going to result in a wrong answer, there's almost no way to even properly estimate the error level. –  Marcin Apr 13 '12 at 13:43
The point is not the approach of making up numbers, it's the approach of determining what numbers you need to come up with, and how to combine them to get the final answer. In an interview situation, these would be WAGs. In the real world, you could come up with a more reasonable answer by doing some research to find better numbers for each assumption. –  Adam Jaskiewicz Apr 13 '12 at 14:00
@Marcin - When doing engineering work, you are very frequently requested to come up with WAGs based on little to no information. While the numbers may be off, someone good can get in the ballpark a reasonable percentage of the time. From that information, decisions can be made. Also, the above described approach is a very reasonable way to guesstimate the number of piano tuners. You'd be surprised how close most estimates can be made when you are skilled at guesstimating. Just because you can't reasonably approach an answer to a question doesn't mean others can't and they are paid accordingly. –  Dunk Apr 13 '12 at 16:31

This is a typical question to see how well can you give ballpark figures, which in turn shows your thinking process.

Now, this particular rehash of the question sucks because it's not easy to know how popular curry is in India, nor how many people actually dine, nor if it's given to children and so on. Other questions on that type are more tractable because the unknowns are more tractable, or map better to general knowledge, like "how many gas stations are in the US?."

Anyway, what's important is how many parameters can you find that are relevant, and how do you estimate them and why.

share|improve this answer
I agree with you on all points. Asking for the number of gas stations yields a much better demonstration, and what the interviewer should be looking for is your ability to identify and estimate the major factors of the specified thing. –  Mark C Sep 30 '10 at 2:33

I can't remember where I read this, but I read that before Microsoft had all the tracking tools they have today that send back reports about how users use their software, when it was time to make decisions about which function to implement and how to implement it, the best they could do was to have a debate about it and the decision was made according to who was the most convincing.

By asking these questions that have no definite solution they could see how you solve problems and also see if you can figure out an answer and defend it convincingly, which was the winning virtue in feature implementation discussions.

I'm guessing some companies just followed suit.

share|improve this answer
The trick with these questions, and why people should be very suspect of any company that uses them, is that MS had professionals evaluate the answers. Most other companies dont... they just read them in a blog or book, and parrot them without having the resources to professionally review the answers. So their assessment of the answers are fairly meaningless. –  GrandmasterB Sep 16 '10 at 5:17
Which would explain why the interviewer went on to the next topic and did not detail what he was looking for. –  Mark C Sep 30 '10 at 2:25
Sometimes the interviewer gages the response and makes a decision that its a losing case, not worth bothering, move on. –  quickly_now Nov 6 '10 at 3:08

The supposed point is that it reveals how you approach problem solving in general.

However, given that that only way of solving such a problem is to arbitrarily pick reasonable-sounding numbers to assign to relevant factors, all it really reveals is which factors you choose as relevant.

In practice neither interviewer nor interviewee has undertaken actual primary or secondary research into the factors that determine whatever quantity is being estimated, so it mostly serves to weed out candidates who think differently from whoever posed the question.

On this one problem (to echo a comment on the question), it's sort of reasonable if you assume that it asks about everyone in the world, because to a first approximation, it is the number of people in India multiplied by the proportion who eat curry for dinner (pick any reasonable fraction).

share|improve this answer

It was probably just to test your ability to react quickly to something. It could also have been an attempt at finding out your problem solving ability, or your estimation ability.

share|improve this answer
Your comments have already been mentioned by other answers. –  Austin Henley Nov 2 '12 at 20:12

Not the answer you're looking for? Browse other questions tagged or ask your own question.