To get a job as a software engineer, most companies have an interview process that includes coding. While these interviews aren’t perfect, they’re widely used, so in order to stay employable it’s a necessary skill to learn how to prepare and study for these interviews. There are plenty of resources online and this guide is a listing of many of these resources to help you practice once you have coding interviews scheduled.
To pass these interviews, a few skills are needed:
- Have a clear, concise, and easy to read resume that describes specifically what you’ve done in school/work. Be prepared to talk about the projects you worked on in depth and describe how the solutions work.
- When a problem is presented, carefully read the requirements, ask clarifying questions, and propose a solution first before coding.
- Code quickly. Practice as many problems as possible, set a time limit for a problem (e.g. 20 mins), and try to solve it in that time. If you can’t figure one out in time, research the algorithms and solutions for it, study it line by line until you understand how it works, and try again. In a coding interview you’re typically presented at least 2 questions that you must solve in less than an hour.
- Understand common data structures and algorithms. Be able to apply them in your problem solving.
- Interpersonal skills. In addition to coding the solution, you’ll have to be able to clearly explain how it works and talk through the problem with the interviewer as you go. Practice online or with a friend. Quickly talk through the problem and your proposed solution before you start coding.
- Be able to analyze your solution in terms of time and space complexity. When presented with a problem try to think of the most efficient solution first and skip coding the naive solution. This will give you time to solve more problems.
- Learn clean code principles such as not repeating code, writing clear meaningful variable names,and separating large blocks of code into smaller functions.
- Practice building actual applications. This will help you move faster and be able to understand code better.
- Think of several test cases that would appropriately test your code. An interviewer may ask you to walk through one of them line by line and describe how it works.
Additionally, if the interview is on the phone or video, ensure your environment sets you up for success.
- Test your webcam and audio ahead of time
- Download any video conferencing software you need for the interview and test it ahead of time.
- Set up your computer in a quiet environment, put your phone on silent, and ask anyone in your household not to disturb you during the interview.
- Solving these problems quickly requires a lot of concentration and you don’t want to be interrupted during the interview and break your concentration.
Data structures to learn
You’ll need to understand the operations on common data structures as well as how to implement them with more primitive data structures. For example, you could be asked in an interview to implement a stack or queue using an array. Here’s a list of some of the common data structures, but be sure to brush up with an algorithms book and/or YouTube videos to get a comprehensive understanding of how they work.
- Maps
- Sets
- Trees
- Graphs
- Linked Lists
- Arrays
- Stacks
- Queues
- Heaps
Algorithms to learn
There’s no shortage of algorithms, but here are a few that are frequently used in interviews, so be sure to gain mastery with a large breadth of problems.
- Writing recursive code. Practice translating iterative to recursive and vice versa.
- Depth First Search
- Breadth First Search
- Set Theory (Unions, etc)
- Dynamic Programming
- String manipulation
- Array manipulation
- Matrix traversal
- Hashing
- Binary Search
- Efficient Sorting, e.g. Quicksort
- Bit Manipulation
- Build an LRU Cache
Websites with Problems
- LeetCode - LeetCode has different problem levels, so start by practicing easy, then work on medium, and later hard. Typically the questions in interviews will be easy or medium level. There are thousands of probleems on LeetCode and it’s arguably one of the best resources for practice problems.
- HackerRank - HackerRank has a lot of problems like LeetCode, but is better organized and provides more context around which areas the algorithms you’re solving are in. Some companies use HackerRank, so it’s good to become familiar with the interface.
- CoderPad - CoderPad is used by a lot of companies for interviews, so practice using the interface so that you don’t waste time in an interview looking for buttons or being surprised by how the interface works with your programming language.
- Project Euler - Project Euler has fun math problems, but they are not typically asked directly in an interview like the LeetCode or HackerRank questions. However, it still helps your problem solving and coding speed, so it can be good to play with some different websites to get a different perspective and learn to code faster.
- YouTube - YouTube is invaluable and there’s tons of great YouTubers that will teach you how to do each type of problem. Simply search for more general terms such as “software engineering interview” or more specific problems, data structures, and algorithms you want to learn. Follow up by actually coding the solutions you learn so that you can do it in an interview.
- AlgoExpert - AlgoExpert is like LeetCode and YouTube combined into an easy to use interface. It makes the problems and their solutions easily discoverable, as well as providing a place to practice.
- Interviewing.io - If you don’t have a friend that can help you practice real interviews, there are websites like Interviewing that let you interview with an actual engineer, but they can be pretty pricey. Instead of spending a lot of money doing practice interviews, you can also apply for more jobs and set up coding interviews with more companies. This way you can practice for free and potentially get an offer from a company at the same time.
- Other - There are countless other websites like LeetCode, some paid so experiment with different websites and find one that works best for you.
Company Websites
Doing research on the culture of the company you have an interview set up with helps with culture, but sometimes they also have information about the structure of the interviews, including how to practice for the coding portion.
Programming language docs
In the interview you’ll typically be able to choose a programming language. Ensure you choose your best one that you can code quickly in. Study the docs for all of the data structures above. For example, if your programming language is Java, you might want to read the docs to HashMap while practicing so that you don’t have to research things during the interview.
Before each interview if you know the name of the people conducting the interview, look their background up on LinkedIn ahead of time so that you have some context about their background when you’re talking to them. This will also let you know what to expect. For example, a manager may ask you about your projects and experience while an engineer might do an in depth coding interview.
The Recruiter
Recruiters can be either internal or external to the company. Internal recruiters would only work for one company while an external recruiter might be able to set up interviews with multiple companies for you. You don’t have to pay the recruiter as the company will pay them when someone gets hired, so it’s typically in their best interest to get you an offer. Regardless of which type, except for smaller startups, most roles will have a recruiter coordinating the interview process. They can be invaluable to ask questions about what to study for and know what to expect in the interviews. They can also provide feedback after the interview so that you know which areas to study more for your next interview.
Books
Everyone learns differently and comprehensively going through books in addition to practicing using the above resources can give you an edge of others. Here’s a few that can be good to get started with.
- Introduction to Algorithms
- Design Patterns
- Cracking the Coding Interview
- Clean Code
- The Complete Software Developer’s Career Guide
Next
The coding interview is just one part of the interview process. Other areas to study include systems design, culture fit, and behavioral interviews. You’ll have to master all of them to get through the interviews at a larger company and receive an offer.