In this article, I will be explaining in details everything you need to prepare yourself for coding interviews. You have been invited for a coding interview, and you are feeling nervous? I have experienced that feeling, and you are not alone. Everyone has the same feeling when something big is going to happen. Especially if this is your first interview or one that is going to get you into your dream company, then you are going to experience a high level of nervousness and uneasiness.
I have been interviewed many times, and it was not easy until I mastered the art of preparing for interviews. My first interview in a big company was at Andela. After doing two tests, I was to pass this "big thing" to get a place there. If you didn't know what Andela is, let me tell you now. It allows beginners to join and gain experience while working. You don't need to be an experienced programmer to join Andela.
I have shared experiences during interviews with my friends, and many were so nervous. You can't totally be at ease during interviews but you reduce the level. You have to find ways to reduce the level of anxiety because this could destroy your chances of getting the job even if you are very experienced. So knowing what to expect during the interview and thorough preparation is the key to manage your nervousness.
Different companies conduct interviews in different ways, and you need to be prepared for all scenarios. The bigger the company, the more complicated the interviews will be. Smaller companies might do live coding interviews (interactive interviews with actual IDEs) or give you a project to complete within a given time on your own. While large companies like Google, Facebook or Microsoft will do several tests to ensure you are fit for the task. This will involve an interview with the recruiter to know about you then 1 or 2 technical interviews, and then you proceed with on-site interviews.
Here is the format of interview created by Yangshun Tay, from Facebook.
It matters neither the structure of the interview nor the number of interview questions. You must be prepared for three types of questions:
- Technical questions
- Design questions
- Behavioral questions
Before we explore these questions in details, let's first figure out how you will get your first, or next, coding interview.
Getting a coding interview
It is not easy to get an interview in a big tech company like Google, even if you are an excellent software developer because you will be competing with many software engineers around the world. There are many applicants, yet the slots are few.
Therefore to be at the forefront of getting the interview, you need a good CV. Based on your resume, the recruiter can tell whether you will be fit for the job or not by quickly reading through your resume. Remember, you will have a few minutes to impress the job recruiter and compete with many applicants there. This is sometimes unfair for highly skilled programmers who have mediocre resumes.
After finishing school, it will not be easy for you to get a permanent job right away. You need to internships to help you gain the necessary skills and experience. This also gives you time to impress your boss. But again getting an internship will be hard. Some of the companies you apply to won't get back you. You wonder why but it all lies in your resume. It merely gave the wrong impression to your recruiter.
You need to mention only the relevant information in your CV. Probably you did many projects out there before applying for the job or internship, and you include much-unneeded information in your CV. So to impress whoever reads your CV, please include only information that is relevant to the company. For example, you worked in a financial institution where you handled calculations and 7managed all files. When applying for a coding job, do not include this information since it is related to coding jobs that you be doing when you get hired. Find some coding projects and do them so that you include in your resume. Therefore, altogether remove all irrelevant information, and this trick will enable you to get hired.
So, with a good resume, let us discuss essential things that will increase your chances of getting an interview. These includes:
- Professional Networking
- Professional Experience
- School projects and Open source Contribution
This s the best way to get an interview. If you know someone already working at a particular company, then the chances of getting an interview will be high. So if you know that some write a message and send them asking for a referral.
Even though referrals will do you wonders, that is not the only way. Consider creating a LinkedIn profile.
2. Professional Networking
This is very important, whether it is online or offline will help as you progress in your career besides helping you get a coding interview.
So, what does professional networking mean? This is all about connecting and building relationships with people in your profession. I assume you are aware of what LinkedIn is. If not, it is a social platform for professional, and it has made networking with other professionals easier.
With excellent professional networking on this platform, recruiters will be the ones looking for you instead of you looking for them. Is this not amazing! If you don't know people who work in companies to rely on referrals Linkedin will be your friend, so make sure your Linkedin profile is updated.
Here are people who think that LinkedIn helped them get hired.
Everyday open your LinkedIn account and check for new notifications. Treat your profile with respect because there is some recruiter somewhere whose job is to look for the best candidates. Ensure he finds you quickly.
3. Professional Experience
If you have been working on one company for some years, then getting a job in a more prominent company should be easy. If you are a student, later try getting an internship first. Sometimes it is hard to get an internship at a big tech company. In this case, target smaller companies or start-ups. Your first internships will surely open doors for better opportunities in the future. Recruiters value past internship, so after getting your first internship, strive to get a role to help you gain the needed experience.
4. School projects and open source projects
While at university do as many projects as possible, and you will include this in your resume when applying for an interview. Also, participate in open-source projects that you can handle. Upload your projects on Github and allow people to download them. This will not only add on your experience but also ensure your resume stands out.
School projects don't count much compared to referrals and professional experience, but assuming all these are equal, then these projects will give you an upper hand in getting the interview.
If you work on referrals, professional networking, and professional experience and participate in open-source projects, then you will be invited for your interview.
So when you get your first, or next, interview, it is time to prepare yourself adequately. Remember "failing to prepare is preparing to fail". Let me teach you how to prepare for the coding interview.
Preparing for the coding interview
Many questions will be asked, some that will less impact on your interview. These questions include why do you want this job. Do not waste your time preparing for an intelligent answer to this. You MUST be prepared for a technical interview because your interviewers care mostly about the technical part of you.
Interviewers will be keen to know how fast and intelligently do you solve questions. Therefore, I will advise you to spend your valuable time focusing mainly on the technical aspect of the interview.
I earlier highlighted the types of questions (Technical questions, Design questions, Behavioral questions) to expect, so lets us discuss them in details.
1. Technical questions
These questions can be about data structures and algorithms, or can be about a specific language, technology framework that the company is conducting the interview use. They can be about Java language, or Spring MVC framework.
Remember that you can be asked to answer these questions on an actual IDE or any tool that lest you execute the code, or on a whiteboard where you will be expected to write the code without help from IDE. It is crucial that you practice for all these scenarios.
If you are familiar with data structures, you need to build a strong foundation in computer science so that you learnt list, trees, graphs, binary search etc. A solid understanding of data structures and algorithms will enable you to write efficient programs that run faster while using minimum resources.
Coders write programs that computers understand, but programmers write programs that a human can understand. Therefore, anyone can code so you must learn to write efficient code. With that said, interviewers will be looking for candidates who can write efficient code and analyze code to come up with better solutions.
6. System Design questions
Data structures and algorithms are not the only technical questions to expect. Many interviewers will be looking for system designers. Many candidates will be able to write efficient code but will know little about system design. So let’s see what system design entails and what to expect.
In these types of questions, interviewers ask you to design the system and architecture for a given project, e.g. school management system, search engine etc. Some elements of design are probably familiar to you, e.g. load balancer, database etc.
You are not expected to design a super scalable system. Even very experienced software engineers sometimes struggle to come up with good designs. Your interviewer already knows that you are starting to design scalable and production-level systems.
These questions are used to gauge how you approach a big problem. You must ask many questions to validate your assumptions about the system you are going to design. You can approach the design in a very iterative way and getting assistance from the interviewer. You should learn a lot about the real world of software development to be able to design excellent systems.
Big companies nowadays ask about system design questions to assess your ability to design and build scalable systems. With that said, I found the most significant resource online to prepare for system design interview questions.
Other kinds of questions include networking, operating system and distributed system. These will not be common, but when asked to make sure they can get some answers right.
Companies don't just hire candidates who are technically very good. They also want people who are an excellent cultural fit for the company.
Therefore, during the interview, you will be asked some behavioral questions like “why do you want to work here?” or "tell me about a project where you faced a challenge with your team and you were able to overcome it". These proposals have no significant impact on the hiring decision; however, your general behavior and the way communicate matter a lot.
At the end of the day, your interviewer needs to know that you are an awesome person who will relate well with others in the company. Even if you are an excellent software developer and the interviewer doesn't like your behavior, then you will get negative feedback, and that will reduce your chances of getting hired.
So during the interview, be friendly to the interviewer. Even if you are an average candidate, you might get hired because of your behavior.
Resources for Preparing for a coding interview
Now let's cover the resources that can help you to prepare for the coding interview. Most of the resources focus on technical questions. They offer a wide variety of interview questions and answers. These include:
1. Cracking the Coding Interview
This is useful when it comes to technical questions. This book is helpful when preparing for coding interviews. Spend your time reading the book for awesome results. It provides solutions in Java. And if you are preparing for another language, then it is not hard to translate the solutions to any language.
LeetCode is an online platform that has many coding interview questions and answers. I recommend that you visit their website and check the problems section. By that, you will have a general idea of how their challenges look like. You can filter questions by topic or difficulty.
You can also submit your own solutions in most of the programming languages that you want. Then LeetCode will run your solution and tell if you passed all the test cases or you failed some. It also informs you if your code is taking longer time than expected to execute. You will also find a forum for discussions among like-minded people. You can use their free service, and if interested in their premium subscription, it is only $35 per month.
In this section, I will explain how a typical coding interview is conducted. You may do a phone interview or on-site interview. So let us see what each scenario entails.
1. Phone Interviews
This will be the first round of interviews. The recruiter will call you and schedule some time for a few phone calls. The purpose is to eliminate unwanted candidates on early stages of the interview. The interview usually takes not more than one hour.
The interviewer will ask you some questions about programming. You will be expected to answer these questions on a shared document between you and the interviewer. You will be typing in a word editor and not IDE. Therefore, there is no auto-completion, no syntax highlighting to help you, so prepare for that.
The questions that are doing to be asked will cover technical aspect, system design aspect and behavioral aspect. But since the purpose is to eliminate some candidates expect your interviewer to go directly to technical questions where you will write some code. Time is not enough to cover be behavioral questions. This article by Steve Yegge explains what to expect during phone interviews.
These tips will help you during a phone interview.
- Find a place with no noise and put on your earphones.
- Practice writing code in text editors to master how to write code by yourself without the help of IDE.
- Think out loud – during real life, you usually don't think out loud, but during the interview do so, to enable the interviewer can assess your thinking process.
- Ask clarifying questions when given incomplete problems. Before making any assumption, discuss with your interviewer first.
- Take a deep breath and relax after the phone interview.
After a few days or weeks, the recruiter will get back to you with general feedback, and if all went well, then your recruiter will congratulate you and schedule another day for the next round of interview, the on-site interview.
2. On-site Interviews
These are different from phone interviews. It is easier to communicate with your interviewer face to face than talking on the phone. According to me, On-site interviewers make the interview process much more straightforward.
The interview takes about 5 hours, where you conduct a series of interviews with different interviewers with varying levels of experience.
You will be asked to solve some programming problems on a whiteboard and discuss your solution with the interviewers. This process is repetitive until you finish all your on-site interviews.
These tips will help you prepare for on-site interviews:
- Don’t try to practice a new coding problem to keep your self-confidence high.
- Sleep very well and arrive at your interview early. Sleeping will help you maintain your focus and arriving early will help you familiarize with the place.
- Be prepared to talk when your interview starts. Think out loud and discuss your solutions and assumptions with your interview before you start coding.
- Don’t panic and remember to maintain your focus and confidence.
After the interview wait for result and be prepared for any outcome. If get hired proceed well with your job. If you got reject don’t lose hope. Move on and hope you something better. Keep learning and improving yourself and try again when ready.
Good luck in programming. Everything is possible with dedication and determination.
Please share this article with your friends and remember to subscribe to my newsletter for more tips. Thank you!