For technical interviews at top tier tech companies, how much time do candidates get for each programming question?

How long would you give them to complete the puzzle? No, I'm not going to show you the puzzle. But I expect you to tell me how long you would give your new friend to complete this ambiguous, unspecified puzzle.

Suppose you wanted to meet someone new, and wanted to test how good they are at jigsaw puzzles by giving them a jigsaw puzzle to solve. How long would you give them to complete it?

No, really. Give me a number. How long would you give them to complete the puzzle? No, I'm not going to show you the puzzle. But I expect you to tell me how long you would give your new friend to complete this ambiguous, unspecified puzzle.

Hopefully, you're not thinking of an actual number right now, and you're actually thinking one or both of these thoughts:

  1. What's the puzzle? I can't tell you how long it should take someone to solve it if I have no idea if it's a 25 piece puzzle or a 500 piece one. A great performance for a 500 piece puzzle would probably take a lot longer than a terrible performance on a 25 piece on.
  2. What does "how long" even mean? I mean, intelligence -- or skill in any area -- is not a binary thing. The faster you solve the puzzle the better you are at puzzles. Suppose, for example, you imposed a cutoff of 1 hour -- i.e., you must solve this puzzle within 1 hour. What does that mean? Isn't someone who solves it in 10 minutes better than someone who solves it 40 minutes, even though both are well before the time cutoff? And isn't someone who solves it in 2 hours better than someone who takes 10, even though both are well after the time cutoff? It doesn't make sense to have a time cutoff when you're not just judging on a binary good / bad basis.

This is exactly how it works for technical questions. There is no time cutoff (other than the simple bounds of an interview being only 45 minutes - 1 hour), and there's certainly no time cutoff that's general across different difficulty questions. The faster the better, generally speaking. But how good solving a question in X minutes is deemed really depends on the question.

That said:

  • It's normal to ask 1 - 2 coding / algorithm questions per interview. (Please do not interpret this to mean that if you solve 4 questions than that means you did well. They may have been easy questions.)
  • Usually you're asked to start talking (not with a complete solution -- just showing how you're thinking) pretty immediately, but it's okay to ask for a minute to so to think if necessary.
  • It's totally fine and normal -- and even good -- to first come out with a brute force solution.