Interview preparation Tech Careers

How to Prepare for Software Engineering Interviews

How to Prepare for Software Engineering Interviews

Disclosure: This post contains affiliate links. If you click through and make a purchase, I’ll earn a commission, at no additional cost to you. Read my full disclosure here.

Disclosure: This post might contain affiliate links. If you click through and make a purchase, I’ll earn a commission, at no additional cost to you. Read my full disclosure here.

The goal of this post is to explain how to prepare for Software Engineering interviews. I will give an overview of the interview structure, dive deep into the 3 types of interview questions and provide resources for mock interviews.

This is part of a mini-series of posts related to career development. The other related posts are:

  1. Interview Preparation Guides
  2. Role-specific information


A typical interview for high-tech companies consists of 2 rounds:

  1. Phone interview (45 minutes): The interviewer either calls the interviewee via phone or they use a Communications app (e.g. Skype, Zoom, etc)
  2. Onsite interview (4-5 interviews, 45 minutes each): The interviewee visits the company’s offices and talks to the interviewers face to face

There are 3 types of questions:

  1. Coding questions, e.g. merge 2 sorted linked lists into a sorted linked list
  2. System designs questions, e.g. how would you design Twitter/Uber/AirBnb/Facebook/Skype/etc
  3. Behavioral questions, e.g. tell me about a time when you had to resolve a conflict

For more information about the types of questions, you can take a look at the the following resources:

The types of questions that are asked in each interview depend mostly on the experience of the interviewee, as is shown in the matrix below.

Coding questionsSystem Design questionsBehavioral questions

Google/Facebook: L3
Amazon: L4
Microsoft: 59,60
(most important question)

Google/Facebook: L4
Amazon: L5
Microsoft: 61, 62

(diffentiating between Intermediate and Senior level)

Google/Facebook: L5
Amazon: L6
Microsoft: 63, 64

(diffentiating between Intermediate and Senior level)

between Senior and Principal level)

Google/Facebook: L6
Amazon: L7
Microsoft: 65-67

between Senior and Principal level)

As is shown in the matrix above:

  1. Entry-level candidates are only asked coding questions
  2. The differentiating factor between whether a candidate will get an offer for Intermediate level or Senior level are the System Design questions
  3. The differentiating factor between whether a candidate will get an offer for Senior level or Principal level are the Behavioral questions, e.g. to understand previous leadership experiences

The following sections go into further detail about how to prepare for each question type.

How to Prepare for Software Engineering Interviews - Coding Questions

Coding Questions

Step 1: Understand the fundamental concepts

In the beginning, you need to understand/refresh the fundamental concepts, e.g. linked lists, string handling, tree parsing, dynamic programming, etc. The following books are great resources:

  • Cracking the Coding Interview: This is a great introductory book
  • Elements of Programming Interviews: This book goes into much more depth. Depending on your preferred programming language, you can buy the version that uses C++, Java or Python
  • The Algorithm Design Manual: This book is more advanced and can be used as a very useful resource while working on Leetcode problems. Many Leetcode problems are based on the algorithms that are shown in the book

If you prefer to watch YouTube videos, then you can use the following:

  • Back to Back SWE channel: Lots of videos on fundamental concepts. Also, it includes very easy-to-understand explanations on dynamic programming, which is always a tricky subject
  • Dynamic Programming for Beginners: Great introduction to Dynamic Programming, which is one of the most difficult types of questions that are asked during the interviews

Finally, if you prefer to read the structured material online in a class format, then take a look at the following:

Step 2: Practice programming questions using LeetCode

LeetCode is the current standard for coding interview preparation. Most candidates will solve hundreds of questions (e.g. 300-500) as preparation for the top high-tech companies. Also, interviewers typically select their questions from the LeetCode question database. There are other similar platforms (e.g. HackerRank), but my suggestion is to use LeetCode as your main website for coding practice.

Here are some answers regarding the most common questions about how to structure your preparation.

Which programming language should I use?

  • If you are an experienced programmer, you probably have a preferred programming language that you are most comfortable with. Use that one.
  • If the job description refers to a specific language, then use that one.
  • If you feel comfortable with multiple languages or want to learn a new one, then most interviewees use Python, Java or C++. Fewer use C# or Javascript.
    • Python: Requires the least lines of code, which is important, when you have time constraints. Also, it’s the only option for ML jobs. However, it might lead to complicated code (especially for interviewers, who are not familiar with Python) and it does not support binary trees natively.
    • Java: Supports OOP and simplifies garbage collection
    • C++: Lots of advanced features such a pointers, memory management, etc which make the language very powerful, but also requires more lines of code and is more prone for errors. If you decide to use it, you should also learn STL.
  • You can also read some additional thoughts regarding this question from the Tech Interview Handbook

How should I approach the problems?

  • In the beginning, try to spend at least 45 minutes in each problem before looking at the solution. As you progress, this number should be decreasing quite a bit, because in most interviews you’ll need to answer 2 Medium questions in 45 minutes.
  • If you look at a solution and understand it, then always return to the problem and write the code yourself (without looking at the solution).
  • Keep notes for each problem that you solve, so that you can refer to them later
  • Make sure that you understand the pattern that is used to solve each problem, instead of memorizing a solution. This way you’ll be able to recognize patterns between groups of problems (e.g. “this is a new problem, but the algorithm looks similar to the other 15 related problems that I’ve solved”.
  • You’ll know that you are progressing, when a) you understand the pattern required to solve each problem just by reading it and b) you see the time required to solve each problem get lower (e.g. “I solved problem A in 50 minutes and problem B in 30, even though both of them use the same approach”)

How should I prioritize which problems to solve?

  1. Start with the Curated List of Top 75 Questions (also available as a LeetCode list, but it’s missing the problem “Cherry Picking #741“). This list was created by somebody who finished 500 LeetCode problems and kept track of the most useful ones.
  2. Continue with LeetCode’s Top Interview Questions. This list has been created by LeetCode and consists of very popular questions. It also has a partial overlap with the previous list. Make sure that you finish with all the Medium problems on that list.
  3. Take a look at the curated list of 170+ Leetcode questions grouped by their common patterns by Sean Prasad (answers shown here)
  4. The Tech Interview Handbook has a 5-week list of Leetcode problems to practice on a weekly basis
  5. Buy LeetCode Premium (currently $35/month). Look at the top problems for the companies that you are targeting. At a minimum, practice with the lists that include the top 50 questions for Google and Facebook.
  6. Remember that most Easy problems are too easy for an interview, whereas the Hard problems might not be solvable within the interview slot (45 minutes typically). So, it’s very important to focus most of your time on Medium problems. A good ratio of Easy/Medium/Hard is 20/70/10.
  7. If you identify an area, which seems more difficult than others, you should take some time to dive deeper by reading books/tutorials, viewing videos, etc in order to understand the concepts better.
  8. Practice with the mock interview sets. They have a time limit and prevent access to the forum, so they are more geared to a real interview. You can also compare your rating against everybody else, who did the same set of problems.

What if I need more detailed/structured solutions for some problems, because the idea is not clear, even after reading the solution?

Observe how others approach the problems and learn from their detailed thought process, instead of directly looking at the final solution:

  1. Nick White’s LeetCode Solutions playlist on YouTube: Nick has recorded himself solving ~190 LeetCode problems
  2. Kevin Naughton Jr’s LeetCode Coding Interview Questions playlist in YouTube: Kevin has recorded himself solving ~120 LeetCode problems
  3. User Grandyang from Cnblogs has solved > 900 Leetcode problems and has posted his solutions with comments in Mandarin (English translation via Google Translate)
  4. Hacking the Coding Interview by Educative.io: This is a paid course that covers ~80 LeetCode problems in detail

How will I know when I am ready to interview?

  • The most important metric is how fast you can solve each category of problems.
  • Remember that the duration of most interviews is 45 minutes, during which you’ll have to solve either 2 Medium problems (most common case) or 1 Hard.
  • Here are some same target times for each category:
    • Easy: 5-10 minutes
    • Medium: 15-20 minutes
    • Hard: 30-40 minutes
  • In order to reach those levels, you’ll need to solve around 200-500 LeetCode problems, which corresponds to 3-5 months of preparation time. These numbers are just a rule of thumb, as the actual time depends on your current coding experience and knowledge.
How to Prepare for Software Engineering Interviews- System Design Questions

System Design Questions

Step 1: Understand the structure of the expected answer

Your first goal should be to understand what the system design interview is about, i.e. what types of questions are asked, how to structure your answer and how deep you should go in your answer.

Step 2: Dive deeper into the building blocks required to answer these questions

After going through a few of the above examples, you have probably heard lots of new terms and technologies that you are not so familiar with. In order to be able to answer these types of questions you will need to dive deeper into a lot of different technologies.

My suggestion is to start with the following videos that provide an overview about how to design scaleable systems.

The following websites have sample list of additional design concepts that you should be familiar with:

Finally, if have enough time and really want to dive deep into system design, then you can read about more advanced concepts at the following resources:

The list of resources is endless, so make sure that you don’t get lost trying to understand every little detail about every technology available. Also, feel free to go to the next step, where you practice with additional questions, and use this section as a reference.

Step 3: See how others answer design questions

Now that you understand the structure and the building blocks, your next goal should be to get a good understanding of how other people answer these types of questions. Videos are a great way to do this. YouTube has a lot of great channels answering how to design Twitter, Pastebin, Uber, etc. Here are some great channels to start with.

Step 4: Practice, practice, practice

The most important part of your interview preparation is to practice real design questions. The following websites have questions and answers:

How to Prepare for Software Engineering Interviews- Behavioral Questions

Behavioral Questions

Some examples of behavioral questions are:

  • Tell me about a time where you influenced or pushed back on a tech design.
  • Tell me about a time that you made a trade-off call that involved engineering
  • Tell me about a project that you’re most proud about
  • Tell me about a time that you failed
  • Tell me about a time when you had to resolve a conflict
  • Tell me about a time when you led a team

These types of questions are answered using the STAR framework:

  • Situation (2-3 sentences)
    • Explain what was happening, e.g. the project that you were working on, the teams involved and what was at stake
  • Task (1-2 sentences)
    • What was your role
  • Actions (the bulk of your answer)
    • Talk about 3 problems that you were facing
    • Explain what actions you took, in order to solve these problems
    • IMPORTANT: Use “I”, not “we”, since you want to talk about your tasks, not the team’s tasks
  • Result (2-3 sentences)
    • What happened in the end
    • e.g. you got an award/promotion, the project launched on time and the company earned $XXX

Please note the following:

  • Prepare 3-5 answers using the STAR framework before the interview and write them down (in a text file, on paper, etc)
  • Your answers should not be longer than 2 minutes
  • Remember to use “I” instead of “we” in your answer, because the interviewer is interested on the actions that you took and not on what the team did

You can find lots of resources about these questions in the internet (also check YouTube), so I won’t go deeper into these questions. Here are same good links to start with:

How to Prepare for Software Engineering Interviews - Mock Interviews

Mock interviews

After going through all the materials above and getting ready to start the interview process, it is always helpful to get some feedback in a low-stress environment. Mock interviews help you test your knowledge and get feedback from another person.

Here is how you can find interviewers for mock interviews:

  • Pramp.com (free): This website connects you with other peers, who are also studying for interviews, so that you can all learn together
  • Exponent: This site has 3 options for mock interviews:
    • Peer interviews (1 free, rest are paid): Every day at 6pm PST, you can be matched with another person doing Software Engineering interviews, so that you can practice together
    • Top Software Engineering Interview questions (free): This is a list of the top Software Engineering interview questions that are asked by top companies. You can see how other peers answer these questions or you can answer them yourself and get feedback
    • Mock interviews (paid): You can select mock interviews from a list of experienced Software Engineers in the top tech companies
  • PractiseCodingInterview.com (paid), GainLo (paid) and interviewing.io (paid): These websites will match you with experienced interviewers, who are currently working in the top high-tech companies
  • Use your network: You can talk to other developers that you know (either from your own company, via LinkedIn, etc) and ask them to do a mock interview for you

Salary negotiations after a job offer

Did you get a job offer and you want to maximize the compensation that you are being offered? If so, then you have 2 main ways:

  1. Ask the help of a professional
  2. Do It Yourself (DIY)

Recommended Articles


  1. Is this for people who are in software engineering already? would this plan work for a non-tech pm to TPM?

  2. This is what’s wrong with out industry…
    5 years from now: solve 2 hard problems in 30 minutes.

  3. Thank you so much for this post. I found it very helpful and I have made a note of some points mentioned here.
    I would like to know what was your typical daily schedule like? How did you distribute your time to cover this?

  4. Correction: Python does support heaps. There is a standard package heapq.
    There are no built-in binary trees in Python, though. But you can always say “imagine we have such library…”

  5. Thank you Fireman!!! I was so lucky to stumble on this today since I plan studying from the basics to get into big tech company despite being a junior in CS. Your guide is a perfect road map for my plan and I am going to follow your advice to achieve my goal!

  6. Thank you fireman. I am currently aiming for a SDE 2 position at Amazon and this post is very helpful to me. Just a question, in the system design round of a typical SDE 2 interview, how often do you run into a interviewer who goes past the things taught in grokking or system design primer and drills you on very domain/technology specific questions ?

  7. Well, a typical interview is 45 minutes. In the beginning you will spend a few minutes for introductions and at the end you will spend a few minutes to ask questions to the interviewer. As a result you have 30-40 minutes for the actual interview. During that time you will have to answer the interviewer’s question. If that question is a Leetcode Hard problem, then that’s the only time that you get. Practice, practice, practice…

  8. You need to solve a hard in 30-40 minutes, are you crazy. No one can do that unless you are John von Neumann. Some of the hard problems are based on PhD work that people spend 3-4 years to solve.

Leave a Reply

%d bloggers like this: