This article discusses what to expect at a coding interview, how to prepare and where to practice to do well at the interview. There are a lot of details and preparation is specific to the interview. Here, we will take a look at how to be prepared for Big Tech interviews.
This article will be a bit less technical than usual Code Project's articles. I want to share with you how to prepare for a coding interview. A coding interview really depends on the country, company, software engineer level, etc. There are a lot of details and each preparation is specific. In this article, we will take a look at how to be prepared for the Big Tech interview.
What to Expect
An interview in each Big Tech company (Microsoft, Google, Amazon, Facebook, Apple) is more or less the same. The first interview is a phone screening interview, after which you’ll have an onsite interview. A phone interview takes about an hour. There will be a simple coding question; you will have to code online with the shared screen. The goal of the screening interview is to see your overall level and figure out if you deserve an onsite interview. Yes, they know you will worry, and that’s ok. Everybody worries. The screening interview is much easier than the onsite interview but you have to prepare for it as well. The preparation for the screening interview is very different from the preparation for the onsite one. In this article, we will focus on how to prepare for an onsite interview.
Let's assume you have passed the phone interview and now you are excited and scared about the onsite interview. The onsite interview usually takes around 4 - 5 hours. There will be:
- 2 - 3 coding interviews
- One architectural interview
Each coding interview takes about 45 minutes. During this time, you must solve a problem. What does it mean to solve a problem? You have to write a working code on the whiteboard and answer questions. The most common questions are about time complexity. You will not have your favorite IDE, so you can forget about IntelliSense. You will only have a pen and a board. To pass this interview stage, you need to know how to crack these kinds of problems. If you don't know how to approach these problems, you won’t have enough time to figure out the optimal solution. You need to practice a lot. It's not only the coding interview, though. You’ll have to show that you can listen, ask questions, and conduct a discussion. We work in teams, and it's really important to show that you are a team player. Yes, problem-solving skills are very important but teamwork is as important, or maybe even more important than that.
It is a break from the technical interview. Remember, lunch is also a part of the interview. The only difference is that it's less important than the technical part. It's still important but has a bit less weight than the coding problems. The goal of this part is to see your other side. Why this company? What are you interested in? How you talk, what you ask. For instance, it would be a red flag if instead of asking questions about the company, you start asking political questions. Anyway, it's a lunch don't forget about it. :)
During this interview, they want to know how you think, find an answer, how you ask questions, what your background is, and how you can maintain a conversation. It's a perfect time to show your experience but do not forget to solve the problem itself, and do not forget about time.
Preparation for Coding Interview
There’s one thing that you need to do before starting the preparation. Come to terms with yourself that it's not going to be easy, it will take time and patience. Now we can start. :) Let's look at this preparation like on an optimization problem, which it in fact is. :) You have limited time, a lot of topics to study, and your goal. The question is how to efficiently spend time to achieve the goal. The preparation is very subjective: it really depends on the person and what knowledge you already have. For instance, if you do not know what
O(n) is, you will spend more time than a person who already knows what it is and how to count it. There will always be something personal and only you know what you do not know. This article is a general algorithm of how to prepare and you will need to tweak it for yourself. Ok, if you're still reading, you for sure want to pass your interview.
Here's what you need to do before you start studying:
- decide which company you want to work for
- get a notebook and a pen
The company name is needed to create an efficient study plan; notebook – for writing down solutions. As you remember, you will only have the whiteboard during the interview. Each company has its own question preferences. Some prefer dynamic programming, some binary trees, etc. It doesn't mean you have to study only one topic, no, not at all. We're software engineers. and we know how to count probability. If a company prefers binary trees over other topics, it means you need to study binary trees first, it will increase the probability to pass the interview. Another key thing you need to know is this. An interview will take nearly a month. In other words, you need to spend at least one month preparing. A screening interview is always simpler than an on-site interview. You can start solving "easy" problems first. On an on-site interview, there will be medium or hard problems.
Here are the steps to increase the probability of passing:
- Filter problems by company name. Try to check several sources. Do not spend more than 1-2 hours on reseaching this.
- Start solving easy problems first. If you don't know how to solve a problem, it's okay to search for an answer but it's normal only at the beginning. You should be able to solve all problems by yourself eventually. Spend about a week solving at least 3-5 problems each day.
Big O notation. Check all your already solved problems and find out the time complexity for each problem.
- Start solving medium problems. Do not jump from one topic to another, focus on one topic. Spend 2-3 days on each of them. You need to solve 3-4 problems each day.
- Spend 1-2 days revisiting your past work. Check already solved problems but read only descriptions and try to remember how you solved them. This step is very important. You can find more here: Forgetting Curve.
- Start solving difficult problems. Spend 2-3 days on each topic. Each day, you need to solve 3-4 problems.
At this point, you know what you don't know, continue to solve problems on your weakest topic. Don't worry it's just an interview. :)
Ok, now we have a plan and what is left is to find out where to practice and how to filter by company.
Where to Practice
There are several online platforms but only some are more suitable. Remember about efficiency and the limit of time? Here is the list:
It's not the full list, but it's suitable for our goal, even though this list contains platforms that are less useful than others. You will see it when we’ll be going through them one by one. You probably already have your own favorite platforms, just do not forget about your goal. A spoon can be used in different cases but the most efficient is eating soup. :)
Here are my criteria:
- Ability to filter by company name
- Different difficulties:
- Ability to focus on one topic (aka filter problems by topic)
- Problem descriptions. It should not be one or half a page. A problem should be very strict. An interview takes 45 minutes; it’s impossible to formulate a problem with a huge description during that time.
LeetCode is a programming learning platform. Let's see what’s under the hood and how it will suit our needs.
Ability to filter by company name: Yes, it's possible to filter by a company name, but it's a paid feature.
hard. Everything is good with this feature. There are exactly three levels of difficulty: Easy, Medium, and Hard.
Ability to focus on one topic (aka filter problems by topic): Everything's good with this feature too.
Problem descriptions: Remember, one coding session takes about 45 minutes. The question should be easy to understand and easy to remember. It should not be something huge (no formulas, etc.). Let's see an example.
The description is pretty straightforward, short and contains some examples.
Summary: Leetcode is a nice platform for preparing for the coding interview. There's one disadvantage: not all questions are accessible, and filtering by company is a paid feature.
HackerRank is another learning platform.
Ability to filter by company name: No, this platform does not have this feature.
hard: Yeah, this feature exists.
Ability to focus on one topic (aka filter problems by topic): Everything is good with this feature.
Problem descriptions: yes and no :) some of the problems can be asked during the interview and some no. Let's see an example.
Nice description but you will hardly see it in the interview and it's not even a full version.
Summary: A nice resource for improving problem-solving skills but not a good resource for preparing for a coding interview. The resource has its own focus, and preparation for coding interviews is not the main goal.
CodeStandard - online programming learning platform
Ability to filter by company name: Yes, it's possible to filter by a company name, and this feature is free.
hard. Everything is good with this feature.
Ability to focus on one topic (aka filter problems by topic): Good too, it's possible to filter by topic
Problem descriptions: Good as well. Let's see an example.
The description is very close to what you will get on a coding interview
Summary: CodeStandard is an excellent starting point for preparing for a coding interview, and it’s completely free. I see only one disadvantage: it doesn't have as many problems as Leetcode.
ProjectEuler is a source of a series of computational problems intended to be solved with computer programs.
Ability to filter by company name: No, this site doesn't have this feature.
hard. No, this site doesn't have this feature.
Ability to focus on one topic (aka filter problems by topic): No, this site doesn't have this feature.
Problem descriptions: Nice description but more suitable for the general improvement of problem-solving skills than for preparing to a coding interview.
I hope this article helped you to look at the coding interview in a different light. The key thing is this: create a preparation plan, remember your goals and practice, practice, and practice some more.
And please, do not forget you will work in a team, you need to have social skills too. :)
- 25th September, 2020: Initial version