How To Ace The Coding Interview

ZTM Instructor Team
ZTM Instructor Team
hero image

In This Post:

So you learned to code and are excited to start working for a huge tech company and then you got stuck…

Why?

Well, probably because applying for a job at a software company is pretty different from any other job application you’ve ever done before.

Sure you might know a guy who knows a guy and can get your foot in the door, but it’s rarely as simple as a phone call and then starting Monday. Even if you have a connection, there's still a series of tasks that you might need to complete.

Like some bizarre game show from the 90s, there are usually set stages of applications featuring a behavioral assessment, puzzles, a quiz, homework, and possibly even a whiteboard section… erm what!?

What coding interviews feel like

Don’t fear though because, in this guide, we’re going to walk you through the exact steps that you need to take so that you can ace your coding interview and get your new job.

How do we know + why should you trust us?

Because we’ve helped thousands of people get hired at major tech and FAANG companies, even if it’s the first position they’ve ever applied for and never worked in software before!

ZTM student success at Google FAANG success story at ZTM Another student suuccess story at FAANG And another ztm student success story at FAANG

Now be warned: This is a BIG guide.

Not only that, but the steps you need to cover to prepare for your interview will take weeks of work to get through. But, if you follow along and do each step, hopefully, you should be able to get that 6 figure job by the end of it!

So let’s get started…

What is a coding interview?

A coding interview can go by a few different names. They’re sometimes called a software interview, a technical interview, a programming interview, or if you’re old school, a Microsoft interview. So-called because Microsoft decided to change their own process for hiring coders back in the 90s to help them filter out and find the best candidates.

The main changes being that they added in job-specific tasks and tests into their interview process. This helped them to not only hire people who can perform on the day but to also find people who have a broader knowledge of specific software engineering areas, such as how data structures and algorithms work.

An additional benefit of this, is that it means that these new hires can move around between departments if needed for a task or project. They specialize in one area but can work in others if needed for a sprint etc.

Microsoft technical interviews

The process worked so well that it got adopted and tweaked by FAANG (Facebook, Amazon, Apple, Netflix, and Google) companies, and then adopted again by smaller tech companies.

It does mean that the process can be a little intense or unneeded for some roles at smaller companies, but more on that in a second.

The thing is, when most people talk about a coding interview, they’re actually referring to just one aspect of potentially a few different steps in the coding interview process…

So let me explain to make sure we're on the same page.

How does the coding interview process work?

Each company you can apply to is different and will possibly have different stages of the hiring and interview process, but let’s break down what you might see.

Stage 1: The quiz

Some companies will give you an online quiz when you first apply. The goal here is to see if you pass a basic level of technical know-how before being filtered through to a human or further testing.

The good news is that it’s not used that often, and it’s also not that difficult to pass, as long as you know the concepts covered in the technical interview, which we’ll cover later.

Stage 2: The coding assessment

If you pass the broad quiz, then some companies will send you a basic coding assessment test as another filter. You log in to their testing portal and they give you a specific problem to code and solve, and it may be recorded.

Almost all companies that run quizzes will have one of these also. It’s designed to see how you problem solve before putting you in front of an interviewer. Again, if you’ve worked through the concepts needed for technical interviews then you should be fine.

Stage 3: The technical interview

This stage is what most people think of when they talk about ‘coding interviews’ because it’s the main aspect that 99% of companies will use. The entire thing is designed to see how you work as a coder which mainly means how you approach problems and how you solve them.

The technical interview looks like this:

  • A quick hello, how are you doing
  • A technical component to assess your skills while someone watches you work through a problem (either online or in person)
  • A final chat and opportunity for you to ask any questions (you should always have questions to ask)

Basically, you’re given either one large technical question or several smaller ones, and are asked to solve these live, while being observed and under a time limit.

How it feels to take a tech interview

Many companies will do this assessment online, but some may ask you to do this in person on a whiteboard. This is especially true when applying for big FAANG companies. They will literally fly you across the world to come in and assess in-person so that you can do a few small interviews during the day.

Don't worry though. The process may differ vs online, but the technical questions and problem solving remain pretty much the same.

This is where most of the work and preparation comes in when looking to pass your coding interview and get the job, as there are literally thousands of potential questions that you could learn.

We actually recommend that you don’t try to learn and memorize all of these questions though. This is a common mistake we see. It's almost impossible to memorize the answers to all the technical questions you could be asked.

Instead, we recommend that you use a framework for working through different types of technical questions so that you can actually solve problems you've never seen before. This is exactly what Yihua teaches in his FAANG Interview Prep course.

You can then use sites like LeetCode to practice using your framework until you get good at answering all kinds of different questions. Don’t freak out though... like anything else, the more you practice, the easier they become.

Stage 4: The paid work test / home assignment

If you pass the coding ‘test’, some companies will send you a final check to see how you work. This stage is usually a paid assignment to perform a task that would replicate your day-to-day experience.

Why do this?

Well, it’s all good having the theoretical knowledge but can you actually do it on a timeframe for a project? Usually, this stage is only implemented by smaller companies.

Stage 5: The behavioral interview

Depending on where you’ve applied, some companies will either do this on another video call as a final stage or may even fly you in for an onsite interview.

The goal here is to see how you would fit within the company and team, while also assessing your personal attributes. They will ask questions about your experience in the past and how you dealt with issues to try and predict how you may respond in the future to similar situations.

Example: “Can you tell me about a time where you made a big mistake in your code?” or “Tell us about the worst manager you've had", etc.

You might think that if you got this far, then you have the job in the bag right? Well almost. As long as you don’t have any glaring trust issues or struggle to communicate within a team then you should be fine.

There are certain questions you will 100% get that you should have a concise answer prepared (ex: "Tell me about yourself / your experience"). Otherwise, be yourself and just show that you are a good human who will work hard and can work well with others. Do that and you should be fine.

Blog post image

Are there specific language or framework interview questions? (Python interview questions, etc)

No. It's actually quite rare and is a common misconception among people who have just learned to code and are about to do their first coding interview.

Problems with language specific interview questions

Maybe this comes from a University mindset, where you have to show what you know about a specific tool to pass an exam. This isn't what happens in most coding interviews.

Sure, the interviewer cares that you know the most important elements of how the language, tools and libraries work (or that you can learn them), but they won't ask specific questions about it, and if they do, its extremely rare.

Bad coding interview questions

Instead, the interviewer will ask you to solve technical questions and problems using that language, and there may be points where you have to explain any limitations in your solution, perhaps due to limitations in the language or framework you're using, but that's it.

They probably won't ask broad interview questions about Python, React, Javascript or any other language or framework, unless there's a very specific element that ties into what they work on.

For example

If you were working with Solidity for a blockchain project, they may ask about smart contracts and how they work, but I doubt it.

They are more likely to ask you to explain specific decisions you made in your project or ask you what the impact would be if you made certain changes. This will give the interviewer a much better assessment of your level of understanding vs. your ability to just memorize facts / info about a language or tool.

Does that make sense?

Don't worry about being asked questions about whichever language you're interviewing for. As long as you have:

  • Learned the language or framework you need for the role
  • Understand how that language or framework works
  • Know any drawbacks that it has when performing certain tasks
  • And have learned how to answer and solve the interview problems, then you'll be fine.

Don't spend hours learning who created Python or specific usage details just for the sake of it, if it's not something you'll need. Learn what you need to know to actually do the job instead!

Do I need to know back-end technical info, even if I’m applying for a front-end role?

Yep sorry 😰.

Like we said earlier, a lot of the smaller companies will often replicate the processes that they see used by larger companies. You might be lucky and the front-end job you’re applying for will ask more specific questions around UX and UI, but there’s also a chance that they ask you to solve core backend problems.

This means that if you want that 6 figure job, you need to be able to pass the broader technical questions under a time limit, and if you’re an introvert, learn how to comfortably communicate.

The good news is, we’re going to cover this and more 🙌.

Overview: The 3 step plan to pass your coding interview and get hired

So now you know what the interview process looks like and what’s needed in order to get through it. Obviously, there's a fair bit of work, but we’ve broken this down into 3 key steps.

Here’s the breakdown for each of them:

Step #1: Make yourself hirable, and improve your chances of success

This involves creating assets such as a resume, a project portfolio or website, and improving your soft skills.

Why do this?

Well, you can’t be hired without a resume, but we also want to help you stand out among the other applicants. We can do this by creating a killer project portfolio and by smashing the behavioral section of the interview.

A huge factor that can help with this is improving your soft skills. Not only will these help you stand out in your interview, but they will also help improve your resume quality and even your efficiency at learning and practicing the technical components.

This means you can fast-track the more difficult/time-consuming part of the application process. Huzzah!

Sidenote: We recently ran a survey of over 3,000 programmers and their experience with AI tools such as ChatGPT.

One thing that really stood out was the fact that 10.7% of programmers who had applied for new jobs in the last 12 months stated that experience with ChatGPT or other AI tools was listed as part of their job application requirements. If you don't know anything about generative AI or how to use it, check out our course on it here.

Step #2: Preparing for the coding interview

Because the questions in the technical part of the interview are fairly complex, you'll want to start practicing these as soon as possible.

You should also start to assess your answers and your progress when practicing, such as timing how quickly you can solve them. Not only will this help you understand your current level of comprehension, but it will also help to mimic the interview environment as these questions are usually timed also.

Set a timer for 30 mins per question and see how you do. Aim to just solve it at first, then aim to solve it faster, etc. This may seem like overkill, but the more you do this, the more comfortable you’ll be during the interview which can help lower your anxiety.

Better still, the more you practice, the better you’ll actually become at being a coder. Sure, you may not use all of this information in your day-to-day job, but you’ll have a level of confidence in both your background knowledge and your ability to solve complex problems.

Imposter syndrome is common among developers and other high-paid professions, so this will actually help you out long term also.

Step #3: Acing the coding interview

Here we’ll look at what you should know before the day, any additional prep to help you stand out, what you should do during the interview, and what you should do after the interview is finished.

Our goal in this step is to make the interview go as smoothly as possible and increase your chance of success for either being hired or moving on to the next step.

We’ll also cover some prep on behavioral interviews, just in case you have one of these also. The good news is that this is very little extra work 😄.

Make yourself hireable

Make yourself hirable

The easy part! Time to get all Neo on yourself and your assets…

Improve your soft skills

Focus on your soft skills first, before you do anything else. Not only will these help you improve yourself and your applications, but you’ll also find the rest of the tasks on this list much easier to complete.

Most people won't tell you this and don't focus on this. They'll just skip right to "create a resume". We think that's a huge missed opportunity. That's why you're going to focus here first.

Learn how to learn

It seems redundant as you’ve already learned how to code, but as a coder, you’re going to be constantly learning new skills as languages and technology evolve.

Learning how to process this information more effectively and retain that knowledge will simply cut your workload down.

We cover multiple methods and tips on how to learn more effectively in our course here.

learn how to learn more effectively

To get you started though, here’s one simple method called the Feynman technique, named after the renowned physicist and Nobel prize winner, Richard Feynman, who championed the method.

The Feynman technique has 4 stages:

  1. Choose a topic that you want to learn about
  2. Breakdown the core concepts so well, that you could simplify and explain them to a 12 year old
  3. Identify any gaps in your understanding and explanation
  4. Organize, review, refine

Here’s how it works:

In the process of learning a topic so that you can then explain and teach it, you’ll actually comprehend it far better.

How is this relevant to coding interviews?

It’s a super simple method, but if you use this approach while learning the technical questions later, you’ll find the questions much easier to comprehend and you'll also be able to explain your problem solving process better, during your interview.

Improve how you communicate

Start exercising consistently

What the hell? I thought this was a coding interview guide!

Here’s the deal… You don’t need to become a fitness model, you just need to create a habit that lowers stress and raises endorphins.

That’s the goal here. Exercise will not only help you to stick to your plan of working on the daily technical practice questions that we cover later, but it will help you to actually get through them each day far easier.

Bonus tip:

Working out early will help you to stay calm and focused for the whole day, but if you can’t manage that, try to work out at the same time each day instead.

Sticking to the same time each day can help you create a habit that you stick to. If it needs to be in the evening, then just do it at the same time, because habit forming makes it so much easier to stick to new things.

You don’t need to implement some massive workout plan or overhaul your diet. Just something once a day to get your heart rate up and give your brain a break. Start small and build up.

No idea where to start?

Search for "30-minute body weight workout" on Youtube.

Or right before you're about to start studying each new question, do 30-60 seconds of light jump rope or just jumping jacks.

Skip for 30 secs, work through answering a question, and repeat for each question. Simple.

Skip daily

Or if you're a ZTM member, just follow along with our 30-day workout plan tailored specifically for busy desk workers.

Honestly, even getting outside for an hour walk is a great option.

I know it sounds like it won’t do anything, but tying the exercise and technical practice together makes it a habit, while also improving how you process the information. Hooray for brain and heart reps!

Speaking of the brain…

Reboot your brain

The final cheat code used by every single high performer I’ve ever met: Meditation.

Basically a soft reboot for your brain, it helps you to deal with pressure but not in the way that you think. Most people assume meditation is used to help you remain calm, which is true, but calmness is a side effect.

In reality, meditation helps you focus and breathe better, while also helping you to remove any errant thoughts. It’s like closing those 100 tabs you have open and running a defrag on the brain.

Make your brain work more efficiently and everything's going to be so much easier from here on out.

Meditate daily

We cover some simple tips and techniques on meditation in this article here. How to find time, get started, and keep at it.

If you can build a habit of meditating daily now, I guarantee you that everything else you do in this guide will be easy. Trust me on this.

Create your resume

Ok, now let's get the boring (but necessary) stuff out of the way.

We’ve covered resumes and interviews before in this article here, but here’s a tl;dr overview.

  • When it comes to your resume, simple beats all else. The easier it is for the reader to find what they need, the more likely you are to be picked (not only that but complex designs can confuse application systems sometimes)
  • Use a Google Doc or MS Word document (print or save as a PDF before sending)
  • You can use templates but again, keep it simple... don't over think this step
  • Personalize your resume for each job you apply to. This will take a few extra minutes per application but can drastically increase your success rate. Think about what the recruiter is looking for and show that to them
  • Make sure that you give context to your previous experience. “I did this, which benefited the employer/client like so”. Customize this for something the company would care about. If they ask for specific skills and you have experience at that, then include how and what you did. Bullet points are fine.
  • Don’t spend more than an hour or two on your resume. You’ll have to edit it multiple times. Send it to someone else to read over for any mistakes
  • Keep it to a single page (no one like reading resumes... especially when companies get 100s or 1000s for a single job)

If you do want to go the extra mile, you can add a cover letter to go into more detail about your experiences and how they are relevant to the job you’re applying to.

However, there are some more creative things you can do that we recommend vs. cover letters. Andrei covers some alternatives here.

Create a tech resume

A great way to make your bullet points actually stand out, is to use the C.A.R method that Yihua talks about in his article here on getting hired at FAANG companies.

How to write bullet points in coding resumes

Finally, be sure to include contact information as well as any personal projects/websites you’ve built. Speaking of which…

Build a coding project portfolio (this will improve your chances of being shortlisted)

Now that you’ve improved yourself and have your resume ready, let’s go the extra mile and further improve your chances of being hired (or at least getting some interviews).

Here’s the thing that happens with job applications. When a recruiter finds a standout resume, they’ll do some research into the applicant.

  • What are they saying on social media?
  • Do they have any personal projects that they’ve worked on?
  • Can I find proof of any of the experiences they shared?

By having an active GitHub profile and/or personal website, you’re showing a level of expertise and skill. You’re not just talking about what you did but instead they can actually see what you created which is HUGE.

Seriously, this alone can help open the door to FAANG because they want to hire people with a little extra going on.

Go ahead and create a Github profile.

Follow the steps in the video below to get your Githib profile set up in under 20 minutes. Once you’re done, start making commits every day.

Easy right?

So what kind of projects should you be working on?

If you really want to stand out, it’s great to have completed guided projects from courses or blog posts, but you should also look at making your own projects or versions of these.

It’s not just applicants who’ve seen success with this approach.

Hiring managers also state it as one of the key things that they look for:

So be sure to have a portfolio listed on your resume that the recruiter can go check out your personal project!

When should you start applying for coding jobs?

Here’s the thing about coding interviews and imposter syndrome… You’re almost always going to feel like you’re not ready. Even if you spend months answering every technical question, you’ll still feel anxious about the interview.

Heck, over-preparation is a sign of one of the 5 archetypes of imposter syndrome!

the 5 archetypes of imposter syndrome

This is fine, but we can’t let fear rule us right?

Especially once you understand that you won’t hear back from every application, and you might even bomb the first few due to nerves.

This is why we recommend you start applying for coding jobs ASAP!

Even if you feel you don’t have enough experience, just apply. Apply to jobs you don't really care about getting first so you can practice.

To get past that feeling of “I don’t think I’m ready yet”, create your own experience by building personal projects.

not enough experience

Once you have the assets from Step 1 in place and have spent a week or two working on technical questions, just start applying for jobs.

Seriously, it’s so important to get started early that I’m mentioning this now before we even get into the prep work, just so you can mentally prepare yourself for it!

How to get started asap

You can use specific practice interview services or simply apply for jobs you don’t really want.

mock coding interview sites

There are a few practice mock interview options such as:

The goal here is to get used to the process and just get out there. You can’t wait forever and the first few will suck, so get them out of the way.

Don’t waste all your time on mock interviews either!

There’s nothing quite like the real thing so start applying and getting a feel for how they work while you continue to learn. You’ll honestly be surprised at how well you might do.

The actual application process really is a numbers game though, so keep applying as early as you can, as often as you can.

Where to find coding jobs

So where do we find good coding jobs? In all honesty, there are heaps of places. These are some of our favorites:

Applying for the job

The application process is generally simple. Fill out your details and attach your resume and boom.

Remember though that the application process for each company can vary. You may get a quiz right away as you finish sending your details or some questions sent, or simply get an email in a day or two to set up a technical interview call. Huzzah!

That being said, remember that the application process really is a numbers game. Some people are incredibly lucky and get through on their first few applications. Others can take 50+.

Hopefully with your resume and GitHub projects you’ve managed to stand out, but some companies will have hundreds if not thousands of applicants so keep applying and stay positive. If you do this enough, you will get through.

Just keep going

You’ve got this, just keep on applying. Customize the resume and application and stand out!

But what about once you’ve booked the technical interview?...

Step #2: How to prepare for the coding interview

technical interview prep

Now for the hard work… I’ll be honest with you, this section is the most time-intensive part of getting yourself ready for a coding interview.

Now that you’re able to get some interviews, it’s time to learn the technical questions that may come up in your interview, how to solve them, and then practice until you can solve them within a time limit.

Some people take 1-3 months learning these, spending a few hours a night. You can do this quicker or it may take you longer. All depends how much time you're spending and how you're spending it.

If you haven’t covered any of this in depth before, or it’s been a few years since you looked into it then don’t worry. We’re going to share some resources and tips to get this done as easily as possible. But if you want to fast-track your progress then I highly recommend our Data Structures and Algorithms course.

learn data structures and algorithms

It walks you through everything that we cover in this guide and more, so that you not only know the best technical interview questions and how to solve them, you also understand the concepts behind them so that you can adapt and solve any variations.

Examples from FAANG interview course

Andrei even walks you through an example coding interview by Google, what everything in the interview means, and how to pass it.

Not bad right?

If you’re stuck for cash though and want to get started with some self-directed learning first, then keep reading and we’ll cover some of the basics here and in the video below:

Start by picking one programming language to work with

It may not seem important now, but I highly recommend that you start using just one language while you practice answering technical questions. This way you’ll not only get better and more experienced in that language, but you’ll also not run into any hidden issues by accident on the day of your technical interview.

Which language should you use for your technical interview?

Well, unless you’re applying for a role that requests a specific language, I recommend either Python or Javascript.

Not only are they high-level languages and easy to use, but these are also 2 of the main options that companies like Google specify their applicants should use.

Don’t try to learn every language. Choose one of them and then start practicing now as you answer the test questions and get familiar with it.

Speaking of practicing…

How to create a coding interview study plan

So, how should you study for your interview? Honestly, it depends on your needs and goals.

Many people will set aside 3 months and study for an hour each night. This can definitely work and for many people, that could be all the time you have.

Personally, I’m a big believer in the task expanding to fit the time you give it, so if you can do it, I personally recommend going all-in. Give yourself a 30-day window and do a few hours each night (or day if you don't currently have a job).

coding interview study plan

Then, if you need more time to learn from there on, you’ll already have a great starting point. You squeezed 3 months into 1 afterall!

How much should you practice each day?

Again, it depends on your goal and your situation. There is a lot to know and like anything in life, it takes a lot of practice to get good at solving these problems and answering these questions in the right format.

  • If you're doing this part-time outside of work, then 1-2 hours a day (for 3-6 months).

  • If you’re focusing on this full-time, then you can easily do 4-8 hours a day (for 1-2 months).

Whether it's part-time or full-time, at some point, you’ll probably hit mental burnout. To avoid this, be sure to take breaks, especially if the information just isn’t processing.

Is it a slog? Yep. But if you don't do it, someone else will. Depends how bad you want that 6-figure salary. We cover other tips to learn more effectively here.

How should you study?

I recommend a progressive system of assessment, with a timer and self reflection. Start with a certain type of question (ex: arrays). Go ahead and set a 30-minute timer, then work through questions like so:

  • Do you understand the question? At the start, it will take a while to even get a grasp of what is being asked. Research and go through notes. It might take you 30 minutes or more to even understand it and that’s fine. Next time it’ll be faster
  • Can you answer the question and solve the problem? Brilliant! Even if it took you a few hours. Again, with practice, you'll get faster
  • Can you do it in the time frame? Depending on the question, you usually only have 30-45 minutes to answer and code the solution on the day, while being monitored
  • Can you do it faster? Now that you’re solving these type of questions within the time limit and understand the concepts of how you’re solving it, can you do it faster?
  • Rotate it out for now. If you take a break from this particular type of question for a few days, can you still solve it within the time limit when you try it again next week?

As you do through, also try and work through questions that are progressively harder.

Your goal should be to get comfortable and under the time frame for each question that you work on.

Yihua (instructor of our FAANG Interview Bootcamp) has graciously allowed us to put 3 hours for free on YouTube which you can watch below. He takes you step-by-step through an easy, medium, and hard array question from LeetCode.

Should I learn every possible technical question and solution?

No, as there comes a point of diminishing returns and it's impossible to memorize every question that could be asked.

Focus instead on having a consistent framework for answering the questions (like Yihua teaches you above) and then for practice, prioritize questions asked by the top FAANG companies first.

which tech questions should you learn first

A lot of the smaller companies use the FAANG questions as a structure for their own technical tests. Also, make sure you understand the concepts behind the problem and the solution. The more you understand this, the easier it will be to still solve when you see a question you've never seen before.

So with the study plan out of the way, let’s start to look at topics you need to learn and common questions.

The 13 core topics to learn for your technical coding interview

Your technical interview test can feature questions on any of the following topics:

  • Data structures: Arrays
  • Data structures: Hash Tables
  • Data structures: Linked Lists
  • Data structures: Stacks and Queues
  • Data structures: Trees
  • Data structures: Graphs
  • Data structures: Recursion
  • Data structures: Sorting
  • Algorithms: Searching
  • Algorithms: BFS (Breadth First Search)
  • Algorithms: DFS (Depth First Search)
  • Algorithms: Dynamic Programming

Obviously, this is quite a lot to learn, so again, I highly recommend taking Andrei's Data Structures & Algorithms course to learn and understand the fundamentals and then take Yihua's FAANG Interview Prep course to learn his exact framework he used to ace coding interviews at many of the big tech companies.

Otherwise you're going to need a lot technical questions to practice from. LeetCode has a great database of questions as well as the solutions and other testers' attempts.

Leetcode interview questions

Leetcode is a paid platform with multiple coding interview questions that you can search through.

example arrays search

You can simply search for a topic and then click on a question that you want to try. Here we looked for a problem on Arrays.

arrays example

Then if you get stuck trying to solve it, you can check out the recommended solution from the questions solution tab.

arrays solution example

Or if you’re a member, you can then click the submissions tab and see how other people also solved it.

Pretty cool right!? Sometimes they will even have a video explanation of a few of the answers.

Which coding interview questions should you learn and practice?

OK, so you know the core topics you need to learn and where to find the practice questions, but which ones should you be looking at and learning?

Personally, I recommend looking at the questions that major FAANG companies have asked in the past. You can Google some of these or Leetcode actually has a filter for specific questions that companies have asked previous interviewees.

company coding questions

It’s for paid members only but worth checking out.

Alternatively, you can try out some of the ones below that have been proven to be used by multiple FAANG companies.

Note: This list is not exhaustive, it’s just a small sample to try out for now:

There’s actually a great list of FAANG questions over on GitHub here.

After that, I recommend looking at the most popular questions from each topic section: arrays, hash tables, etc. Look at those and try to answer 5-10 of the most popular, then move on to the next topic.

Finally, here's a great video playlist on understanding algorithms by Abdul Bari.

introduction to algorithms

Remember:

  • Set a schedule and try to practice at the same time each day
  • When practicing, set a timer when answering each question. Allow yourself 30-45 mins max
  • Aim to solve 2-4 questions per day
  • Repeat questions until you can do them within the time limit
  • Test on harder questions until you can do them in time also
  • Retest on previous timed questions after a week, to see if you’ve retained the solution in time

How to solve coding interview problems

OK so let’s talk about some tips and tricks for actually solving problems.

A key thing you need to understand is that the recruiter isn’t just looking for people who have memorized solutions to questions.

They’re looking to hire problem solvers who can figure out how to solve new problems that will occur on the job.

This is just a great way to find out who the best problem solvers are.

The company is aware that no one can know all the answers to each problem and that in the real world coder are Google-fuing their way to find solutions.

Coders learn to Google fu

They’re usually less interested that you solved a problem correctly. They care more about your thought process and your approach to how you solved it.

Heck, some of the problems they give you are not able to be solved in the time frame. Sneaky devils!!

They don’t care about you solving it there and then. They want to see how you actually think and if you could build a solution, with enough time. Can you see what needs to be done and make a plan of attack?

It’s all about the critical problem solving skills and communicating the solution. You have to show that you understand the different data structures and algorithms, and then reference that in which solution you choose:

  • What is your solution?
  • What are the potential drawbacks?
  • Why is this the best solution?
  • Why is it better than X?

It’s all about communicating your thought process as much as possible!

So with that in mind, let’s walk through the best step-by-step process to solving each interview question, regardless of if you’ve practiced it before.

Get organized

Write down the key points to the question. It will help solve the question but also show the recruiter that you’re organized.

Double check that you have the correct information

What are the inputs and outputs? Can you assume that they are correct? Ask the interviewer. If not then you may need to test the inputs. If you can assume it’s correct, then you’ll save yourself time having to test. Simply ask now and save time.

Decide on what’s important

You need to assess and figure out which is the most important aspect to the problem. What’s the main goal? Do you have time, space and memory?

Don’t ask too many questions

It’s ok to ask for the most important information, but try not to always be asking questions. Show you have the courage to ask what's important, but the self sufficiency to then solve the problem.

Start simple

Don’t get too complex just yet. Often the simple solution is best, so ask yourself, what’s the brute force approach to solving this? Talk through your thought process. You don’t need to write any code just yet, simply think through a possible solution.

Will this simple solution work?

Again, you want to show that you can critically assess problems. It may work at X point then fail when scaled up. Talk through this so you can show you’re thinking this through.

Walk through your actual solution

After looking at why the simple version won't work, and tested applying different data structures and algorithms to the problem, you should have now come up with a solution that solves the problem, or at least can be good enough for now.

Your solution doesn’t need to be perfect. In fact, there may be areas when you could even break it if you did X. Are there any bottlenecks? If that’s the case, talk through these situations. Also, be sure to use everything that the interviewer gave you.

Map out your process first

Before you start to code, map out the steps that you’re going to work through. What are the key steps you need to create and in what order?

Write your code

Keep it clean. The 3 areas of good code are Readability, Time Complexity and Space Complexity. Make sure it's readable, write code that reads well and break it up into small pieces.

Don’t be afraid of adding comments either, as these can help you to avoid creating additional sections of code.

For example

Think about error checks and how you could break this code. Then, make a comment on that section of how you would test it to get around this. You don’t need to write the code for it now, just show that you would solve it and write it here in the future.

Test your code

Check for no params, 0, undefined, null, massive arrays, async code, etc.... Can you make the answer return an error? Poke holes into your solution. Are you repeating yourself?

Could you improve your code?

Remember that it’s not about getting something perfect right away. It’s about finding the best solution when critically analyzing the problem.

Even if your code works, there are probably areas where you could further improve on the code and that’s fine. In fact, you should discuss this with the interviewer.

  • Does it work?
  • Are there different approaches you could use?
  • Is it readable?
  • What would you google to improve?
  • How can performance be improved?

💡 Stand out from other candidates by asking the interviewer for feedback and also what the most interesting solution they have seen to this problem. This will show your curiosity and desire to learn and grow.

Could it scale?

If your interviewer is happy with the solution, then the interview usually ends here. It is also common that the interviewer asks you extension questions, such as how you would handle the problem if the whole input is too large to fit into memory, or if the input arrives as a stream.

This is a common follow-up question at Google, where they care a lot about scale. The answer is usually a divide-and-conquer approach — perform distributed processing of the data and only read certain chunks of the input from disk into memory, write the output back to disk and combine them later.

If you follow the approach above, you should be in excellent standing to both solve your technical questions and show competence with the interviewer.

I highly recommend using this same approach when solving practice questions on your own, so that you get into this step by step habit for solving, analyzing and working through your solutions.

So with that out of the way, let’s get into the actual interview itself.

Step #3: Acing the interview

Acing the coding interview

Now that you’re skilled up and are ready to impress, let’s walk through where to find jobs and how to smash that coding interview.

What to do before your coding interview

Alright, let's break down what you need to be doing before, during, and after your technical interview call / whiteboard meeting.

A few days before the interview

A HUGE thing that will help you stand out from the crowd, is actually researching the company that you’re going to interview with, along with the person who is going to interview you.

What does the company do? What technologies do they work with? What are your interviewers interests / beliefs?

If you don't know who will be interviewing you, then ask the recruiter.

Why?

Because if you know who this person is, you can research them (LinkedIn, Google, etc.) and then use that information to prepare thoughtful, specific questions to ask that demonstrate your curiosity. Maybe you have similar interests and hobbies you can talk about? These things help you stand out on the day!

Also, think through the common questions that they’re going to ask you. Be genuine, but have an answer in your head so you don’t go blank when asked.

Questions like

  • "Tell us about yourself"
  • "Why do you want to work for X company?", or
  • "What sets you apart you the other 100 candidates?", etc

If you’ve already researched the company and the job, and genuinely want to work there, then you should be able to have a custom response in your mind before you even take the interview.

Practice in front of the mirror. Even better, practice in front of a friend (or use a mock interview service).

prepare for the tech interview

It may seem like overkill but these are the things that set applicants apart.

Anything that can help them see that you’re the best fit will compound your chances of getting hired.

Finally, they should have sent you a Zoom or Skype link for the call if you’re doing this online. If not, reach out now in advance and ask them about it.

If you’re going in person, make sure you have everything ready before you head off. Charger cables, headphones, notebook, etc.

The day of the interview: 2 hours before

Again, assuming your interview is online:

  • Make sure your internet connection is solid and nothing needs updating. You’ll be amazed how often Skype or Zoom loves to do daily updates right when you’re about to take a call
  • Test your mic and webcam
  • Turn off notifications. You don’t want Slack popping up
  • Make sure to make the area quiet. Leave a note for friends and family that you’re in an interview if need be
  • Dress comfortably but smart. There's a reason black or single color T-shirts work, and they look great on low-quality webcams
  • Set up shortcuts in your IDE
  • Get headphones ready if you need them
  • Grab a pen and notepad. You might need them and don’t want to have to look for them mid-call
  • Hydrate accordingly

Ok, so that’s the prep before, let's talk about what to do during the interview…

What to do during your coding interview

First of all, stay calm and open, and remember to breathe. Deep breaths will remove any anxiety, while shallow breathing will actually make you feel anxious for no reason.

Also, remember that the call has 3 main components:

  • The meet and greet
  • The technical assessment, and
  • The final questions and closeout

The interviewer is not only evaluating you on if you can answer the technical questions but if you can also communicate with them.

Smile, bring the positive energy, and have a two-way chat with them. They don’t want to be sitting with a scared interviewee that is low energy, and can’t hold a conversation.

what interviewers are looking for

Again, this alone will help you to stand out among the other candidates, but you also need to remember the 4 areas that they’re looking to assess you on:

  • They want to see how you communicate and that you ask questions, especially about the company and the questions they give you. Remember the process we went though. Clarify the problems and even the assumptions! Don’t jump into coding right away. Think it through and chat with them.
  • They want to see how you approach each problem and how you communicate your ideas and solution. Are there trade-offs to your method? Are you aware of them but have weighed the costs and explained it to them?
  • They want to see how you apply your solutions
  • And they want to see how you solve any issues in your code if it doesn't work at first.

Stay calm and do the work and have fun! You got this far so enjoy yourself.

Finally, answer any personal questions and be sure to have at least 2 questions to ask them as well.

It always bugs me when candidates don't have any questions. Think about it... you are potentially going to work at this company / with this person for 40+ hours a week... how can you not have ANY questions?! It's super easy to come up with a couple questions.

Here are some examples:

  • What are you looking for in the perfect candidate?
  • What do you like most about working for {Company X}?
  • What's the most interesting project you've got to work on at {Company X}?
  • What could I have done better during the interview?
  • I'm really excited to hopefully get started, what are the next steps?

Showing how interested you are in working there and getting started can never hurt your chances. Who do you think they want to hire? The quiet person who ends the call who they might forget, or the person wanting to start on Monday?

Ending the coding interview

Remember to chat about your code with the interviewer, and bring up any ways you think it could improve. This helps show your ability to improve with your problem solving.

But don’t forget, the end of the interview is a final chat with you about the role. You don’t need to jump off once you’ve solved the problem. Remember to use this opportunity to ask any questions you have about the company and the role.

What to do after your coding interview

Always write a personal email to each of the people who have interviewed you within 24 hours.

This isn’t about spamming them or being pushy. It’s just showing professional courtesy and staying top of mind.

Blog post image

Send one email only. In it simply:

  1. Thank them for taking the time to interview you and that meeting with them re-enforced how much you are looking forward to being part of their team
  2. If there were any technical challenges that you couldn’t answer during the interview, let them know that you have looked at the problem, found the solution and then share it with them. Hopefully you were able to figure it out by this point in the comfort of your home and Google. This shows that you may not know everything (because no one does), but you’re always willing to figure it out!
  3. Ask them when you should expect an answer

How to pass the behavioral / culture interview

{ }

OK so what if you get through the technical interview, and now they want to chat on a more personal basis with a behavioral interview?

Not to fear as these are actually quite easy. The main thing to understand is that the interviewer is looking for final reasons why you shouldn’t be hired. Are there any glaring red flags of how you might not be a good fit for the company?

Coding interview red flags

As long as you’re a good human and follow the tips below, then you should be fine.

  • Don’t sit in silence. Have energy and passion. Make it a back and forth conversation with the interviewer. Again, they’re looking for people who can communicate. Ask questions also. Get the interviewer to share with you if possible!
  • Be honest. If something feels off about your answers, it’s a huge red flag. Be genuine about your answers to any and all questions-even personal ones.
  • If you researched the company beforehand, you know what they’re interested in and why you want to join. This will help you to give genuine answers that align with both your and their values without seeming like you’re just telling them what they want to hear. No one likes that
  • Can you work with others? One of the other red flags is simply checking to see if you’re a team player. If you can’t work with others then it doesn’t matter how good your code is. Sure if you’re the best in the world at something you may still get hired, but if this is your first job, chances are slim that you can outweigh bad behavior with amazing skills. Hopefully you worked on the soft skills we talked about right at the start of this guide…
  • Own your past mistakes. Everyone makes mistakes but not everyone learns from them. It’s far more compelling to call out your own shortcomings in the past and how you’ve worked on them since. Also, never place blame on others... it's the easiest red flag that will get you cut.

This interview really should just feel like a low stress conversation where you chat back and forth.

Handling rejection

So, what if you meet all criteria, ace the interview but still don’t get the job.

Handling coding interview rejections

It sucks but the things to understand about rejections are:

  • This happens and it’s nothing personal. There may have been a better fit but that’s not to say you wouldn’t have been an awesome hire also
  • You can still keep applying to jobs. A rejection doesn’t mean that no one wants to hire you. Heck, you can apply to other jobs at the same company!
  • A rejection doesn’t go on your resume, Linkedin or social media
  • Only by applying and putting yourself out there, can you get the job. The more rejections you get, the better you’ll become at each application. It may seem silly now, but it will actually help you out in the long run when you transition to new roles, new companies etc
  • Create positives from this. Ask your interviewer if there was any way you could improve? This request for feedback shows integrity and you can use this to secure the next job. Ask them when it would be ok to re-apply for other roles. (I actually did this when rejected once and it helped me stand out so much that when the initial hire wasn’t a great fit, I then got offered the role).

Handling an offer

Huzzah! You checked your email and a job offer came though, so what now? First off, I highly recommend a celebratory dance party.

Blog post image

You have a few options of how to reply:

  • It could be that the offer they sent through is fantastic and this is your dream company and you want to jump on it right away. There’s nothing wrong with this and I’ve done this myself also.
  • If you’ve applied to a bunch of jobs though, then it’s totally fine for you to reply, be positive, and then ask for some time to decide. Make sure to be super thankful for the opportunity and ask for a day or two, and then let the other companies that you’ve applied for know that you have an offer. This happens a lot in the tech industry so don’t feel bad about this. It’s simply showing that you’re in demand, and you can even use this as leverage to negotiate salary.

Just be sure to reply soon, and then make a decision within 48 hours.

So what are you waiting for? Get yourself hired today!

Chances are high that you’ve read through this guide before you started to do any of the tasks on it, and you’re excited to get started.

That’s totally fine but don’t just stay excited though. Use that energy to take action. Don't wait. Start working through the steps that we’ve covered!

As long as you follow along and put in the work, you should be able to crack each aspect of your coding interview. Simply work through each step in the guide one by one.

If everything above feels daunting or if you just want a bit more guidance and support along the way, then come join the ZTM Academy and take:

  1. Master the Coding Interview: Data Structures + Algorithms
  2. Master the Coding Interview: Big Tech (FAANG) Interviews

You'll be guided each step of the way by Andrei and Yihua (both senior developers) who have been in your shoes. You'll also get to be part of our community and get support from 100s of other students on the same journey as you.

Either way, you hope this guide helps you get prepated and ace that coding interview. That 6 figure salary is within reach. Make it happen!

More from Zero To Mastery

What’s The Best Way To Learn To Code? preview
Popular
What’s The Best Way To Learn To Code?

Coding Bootcamp vs Degree vs Self-Taught? There are pros & cons of each route. This deep dive breaks it all down and will help you find the best option for YOU.

[Full Guide] Learn To Code For Free in 2024 & Get Hired in 5 Months (+ Have Fun Along The Way!) preview
Popular
[Full Guide] Learn To Code For Free in 2024 & Get Hired in 5 Months (+ Have Fun Along The Way!)

Updated for 2024 (including A.I. & ChatGPT). In 2014, I taught myself how to code & got hired in 5 months. This is the step-by-step guide I used. Now 1,000s of other people have also used it to learn to code for free & get hired as web developers.

How To Get A Job In Tech & Succeed When You’re There! preview
Popular
How To Get A Job In Tech & Succeed When You’re There!

Are you looking to get a job in tech? These are the steps (+ tips, tricks, and resources) from a Senior Developer to get hired in tech with zero experience!