A lot of people asked us what would be an ideal interview process and what do interviewers expect from a candidate. The answer may vary case by case since different company has different preferences, but I’d like to cover some general rules that can make your interview process more predictable and clear.
What is an ideal process?
Unless you are those super talented candidates who can solve a coding question within 5min perfectly, the interviewer will always expect you to have a short discussion about the problem. You may clarify some conditions, or you may talk about your hunch. After 5-10min in general, you are expected to come up with a solution no matter how terrible it is. The solution can be very slow or consume lots of memory, but it’s ok as long as it works.
Then based on the solution, the interview expects you to further optimize it. You may discuss a lot with the interviewer and he can give you hints and evaluate your reaction based on the hint. In general, you should try to optimize the solution step by step and be very clear about it’s time/space complexity.
Finally, you will write solid code for your solution. The interview may ask you to go thru the code with some test inputs to prove it actually works.
1. Many candidates didn’t talk about the simplest solution first because they thought it’s not optimal. However I always encourage people to do that as it shows you can solve the problem at least with some approaches. And in the worst case that you are suck there, the interviewer can give you hints based on your solution or he can at least provide some feedback.
2. People think coming up with the best solution is the only factor that determines if you will get hired. But what’s more important is the discussion process. During the discussion, you showed your analysis ability, communication skills and also a lot of basic software concepts are discussed like time/space complexity. This means even if you failed to get the best solution, you still have great chance if you showed those abilities to the interviewer.
3. Some candidates believe that they should come up with the best solution directly. Of course it’s great if you can do that. But more often than not, it’s a step-by-step process. You may come up with multiple solutions and each one is slightly better than the previous one. And also it’s possible that the question has multiple optimal solutions or no optimal solution at all. Another case is that in different situation the optimal solution is different (like with less memory resources, solution A works. However when you have lots of memory, B is better).
What should I do?
I’d like to put everything in action items to make it clearer.1
1. Talk about your solution no matter how inefficient it is.
2. Discuss with your interviewer as much as you can. Some people like to ask for 5min quiet time to think about the problem, which is terrible. You should always talk about what’s in your mind while thinking, and I know it’s hard. That’s why you need to practice.
3. Be very clear about time/space complexity. Otherwise you have no idea how and what to optimize.
4. Pay more attention to analysis and communication while preparing your interview, instead of only focusing on the solution.
5. Be very clear about your solution before writing the code. Many candidates thought they were ready to code, but they got stuck in between. Not only does this waste your time, but you are also showing some kind of weakness on your analysis ability.
I hope you find this blog post helpful. Meanwhile feel free to email email@example.com for any interview preparation questions. You can also check our website http://gainlo.co to schedule mock interviews with professionals from top tech companies like Google, Facebook etc..