Follow us on Facebook and get an exclusive discount!

Follow us

How to Pass a Coding Interview: 10 Steps That Actually Work

Last updated: November 11, 2026|18 min read|By Alexandra Moore
How to Pass a Coding Interview: 10 Steps That Actually Work

This is the story of one candidate. The story is not about the questions themselves, but about the path he took, and it can benefit someone in the same situation. It's a bit long so stay with us till the end.

If you want the exact questions, you won't find them here. Enough to know that the questions he got were very similar, and sometimes even the same, to the LeetCode questions recorded for each company.

What happened at each company?

Google

  • The recruiter called him in November.
  • There was no phone screen and he went into the final round straight away.
  • The final round was online in mid June:
    • 3 coding rounds: one Medium question and two Hard questions from LeetCode.
    • 1 system design round.
    • 1 round for behavioral questions.
  • Result: rejected.

Amazon

  • He applied on the recommendation of a company employee and the recruiter contacted him around January.
  • He did the online assessment in early June.
  • The final round was online in mid June:
    • 3 coding rounds, and each also included Leadership Principles questions, and all code questions were Medium.
    • 1 round for system design that also included Leadership Principles.
    • 1 round with the Bar Raiser.
  • Result: He received an offer.

Facebook

  • The recruiter called him in November.
  • The phone screen was in early June and there were two questions: Easy and Medium.
  • The final round was online in mid June:
    • 3 coding rounds with two questions each: Easy and Medium.
    • 1 round for product design.
    • 1 round for behavioral questions.
  • Result: rejected.

Ready to ace your next interview?

InterviewMan gives you real-time AI answers during live interviews — undetectable on Zoom, Meet, and Teams.

Try InterviewMan Free

Spotify

  • He applied with a referral in January.
  • The phone screen was in early June and there was one Easy question.
  • The final round was online in mid June:
    • Behavioral questions.
    • System design.
    • 1 coding round with one Medium question.
    • Case study: He finds a problem in the app and fixes it.
  • Result: rejected.

Who is he?

He is in his mid forties, married with children and loves many things. He knew some programming, but most of it was in assembly language on microcontrollers. He learned programming from scratch. After many years he started working in web development.

He doesn't think of himself as particularly smart. The whole story is that he is a little stubborn and doesn't give up easily. He does not have a CS degree. He didn't know what a binary tree, big O or recursion was. To him it was all strange, useless magic. Why should he even learn it? The libraries he used every day did all this without him seeing it.

He was interested in testing, the goals of the team and the product, and the relationships between people in the team. He was happy with his work as a software engineer and didn't know what was going on in these libraries.

Years ago, recruiters from Facebook and Google contacted him. He asked them for 3 months to prepare. He looked at the materials they had sent him and realized he didn't understand any of it. So he started reading a few books and naively bought an online course that had a certain number of questions. He had never heard of LeetCode.

At both companies he failed the phone screen, and his performance was very poor. The lesson was that his level needed to be raised significantly.

Second chance

Years passed and he worked at a few companies and in a few jobs. In the last of these years he suddenly found himself unemployed, but had a good severance package. At exactly the same time, recruiters from Google and Facebook contacted him and asked about him (and he says that sometimes these coincidences are not really coincidences). It was as if all the planets were lined up.

He had time and enough money to try. An opportunity like this only comes once in a lifetime, especially for a man his age with many responsibilities. He told them that he would speak to them again when he was ready.

He thought of it like a professional athlete training for a 42 km race, or an MMA fighter preparing for a major tournament. He believed that anyone in good health could make it to the end of this race, provided they planned, committed and trained properly. This also applies to interviews with FAANG companies. If he could write an assembly program that suppresses jitter, design a circuit board with parts on both sides, and build a microservices gateway, surely he could learn that too, right?

This time he wanted to be 100% prepared. He knew that what he wanted was difficult:

  • To solve almost every Medium or Hard question on LeetCode without taking much time.
  • To write clean and tidy code.
  • To think properly about the problem and explain his thoughts out loud as he solves it.
  • To understand system design well.
  • To measure himself against these goals at any time, to know how far he has come and whether he is ready or not yet.

A plan with dates

He made a plan with a lot of details, divided into phases, and each phase had a deadline. For example: on a certain day he would finish and understand this algorithm book. On a later day a certain number of problems would be solved. On a third day, he would be solving most of the Medium questions in less than 40 minutes.

The plan progressed step by step: from simple concepts to difficult ones. Because his foundation was weak and he wanted it to become strong. He could not count on knowing what to do on the day of the interview.

The first step was a little theory about CS. He started with the book “Introduction to Algorithms”. A few chapters later, he felt that mathematics was taking up all his time and he was moving away from his goal. So he left that book and started a new book by Skiena called “The Algorithm Design Manual”. This book was much simpler and gets straight to the point, and he also loves the stories Skiena tells from his actual work. He read the whole book and did most of the exercises in it, and then he felt like he could start solving problems.

First problems

He tried many websites: HackerRank, Byte by Byte and LeetCode. He also tried the book “Elements of Programming Interviews”. After a few problems, he realized that each problem was taking too much time and he didn't like the way he solved them. He also found that his studies were not organized. He studied many topics (Math, Graphs, Bit Manipulation and DP) and understood the theory behind each topic but was slow to come to a solution. Sometimes his thoughts went round in circles.

At home he did not have a specific daily routine. Then things got more complicated when COVID hit and the kids stayed home, leaving him and his wife to share teaching and playing with the kids. He needed to change something big.

He started waking up at 5:00 AM so that he could have a few quiet hours to concentrate. He agreed with his wife on a fixed schedule, giving him the same hours every day to study.

Ready to ace your next interview?

InterviewMan gives you real-time AI answers during live interviews — undetectable on Zoom, Meet, and Teams.

Try InterviewMan Free

He also needed to follow a system in the study itself. He visited many forums and read what other engineers were doing: which method they followed, which books they read, how long it took and how their plans worked.

Clearer system

After thinking carefully, he decided to do the following:

  • He solves only on LeetCode. He starts with Easy, and when he gets used to it, he moves to Medium and then to Hard.
  • He doesn't stay on one topic for too long and switches between different topics.
  • He follows lists like “Top 100 interview questions”.
  • He times each problem.

The final point was to see how much better he was. Same idea as dieting: If you don't weigh yourself, you won't know whether you've lost weight or not. So he created a Google Sheet with these columns:

  • Problem Type (Array, DP, Graph, etc.)
  • Its name and link
  • Difficulty level (Easy, Medium or Hard)
  • When he started
  • When he finished
  • The time it took
  • Time color (red, yellow or green)
  • Result color (red, yellow or green)
  • Notes: Did he solve it correctly? Why? If he didn't solve it, why not? What to watch for next time?

These two colors were a measure of his performance. If he solved a Medium in 20 to 30 minutes, the color is green. If it takes about 60 minutes, yellow. If it takes longer or no solution is achieved, red. The same goes for the result: the simple and optimized solution is green, every other solution is yellow, and if he didn't solve the problem it is red.

This gave him something to see his progress with. As the rows grew, he looked back at what had happened and made sure he was making progress.

From there, things started to improve and he became more organized. He develops a solution, writes code, and then compares it to people's solutions in the discussions on LeetCode. He feels that these discussions taught him more than anything else, and from them he drew the most important patterns that he continued to use.

The system design

In system design, he had years of experience in companies producing web products and worked a lot on infrastructure, especially AWS. He thought he would pass this round. But he didn't want to rely on it either. He read the forums, bought the book “Designing Data-Intensive Applications,” and also purchased a well-known system design interview course. When he finished, he knew he was missing many things.

Testing himself for real

The final part of the plan was to test himself in real-world conditions. If you study on your own, you can solve all the problems and remain satisfied with yourself, and still not succeed in the real interview, because there are surprises and the clock is running. Like a runner running short races before a marathon or a fighter sparring in the gym.

So he started doing mock interviews. The first site he tried was free. You and another engineer switch roles: one time you ask and one time you answer, and the site selects the question. This gave him a little taste of reality. But he didn't like the people who interviewed him. He felt like most of them had never interviewed anyone before and didn't know what the candidate should show. And the feedback was weak.

After that, he tried another paid website where engineers working in big companies ask the questions. Here he met people who were stronger than him. He failed in almost all mock interviews, both because of the solution and because of the time. He began to despair and his enthusiasm waned.

Time and patterns

So he changed his plan again. He paused the mock interviews for a while and focused on speed by using the mock interview feature on LeetCode. Each morning began with one or two mock interviews on LeetCode. That means up to 4 Easy and Medium problems every morning.

He noticed that most problems repeat the same patterns. In a perfect world, you would not force a problem into a ready-made pattern. But the time in an interview is short, so he saw that finding the pattern of the problem was a good way. This was confirmed when he conducted a mock interview with an engineer working at Amazon. This engineer told him to divide the time for each problem like this:

  • 10 minutes: He asks about the assumptions and edge cases, chooses the method and determines the pattern:
    • Direct solution
    • BFS/DFS
    • Flood fill
    • Brute force
    • Backtracking
    • DP
    • Greedy
  • 10 minutes: finds a brute force solution.
  • 20 minutes: writes the code.
  • 5 minutes: runs a test.

The same steps can be found in parts of the book “Cracking the Coding Interview” by Gayle Lackman.

He bought a course on patterns for coding questions. The course helped him a lot, but it doesn't contain everything, so don't believe every word.

The hardest part for him was dynamic programming, and he sees that most of those who solve on LeetCode struggle with it too. There is no way out except to study it! To him it was magic that was incomprehensible. He took a course on it too, and that course with lots of practice helped him.

After months

Months went by. He improved, but he was still far from the level he wanted and his speed was still not enough. He took part in the contests on LeetCode, but never solved all 4 problems in one of them. Mock interviews sometimes work and sometimes they don't. But he's getting used to it. He is no longer affected when a stranger he will never see again judges him.

Over time, he got smarter: he asked questions that helped him understand what was needed, and if he didn't find the best solution, he wrote a brute-force solution so that there was at least some code.

He used to talk to the recruiters, but every time he postponed the interviews because he felt he wasn't ready. 4 months, 5, 6. He had actually solved 400 problems on LeetCode and done a lot of mock interviews. And he still felt like something was missing. In the end he felt that he was making no progress at all and that he would not improve any further during this time. Maybe the planets will align better next time?

Take the step

At this point he just had to go into the interviews. He felt that even if he solved more problems, he wouldn't improve. The money soon ran out, too, and he had to go back to work for his sanity: to stay with the engineers and work on something together.

So he decided to go in. He told himself that even if he didn't get an offer this time, he would do much better than the first time. In any company other than these large companies his level would be much higher.

He was afraid of a bad interviewer or an impossible question. He was afraid of embarrassing himself in front of them. On the day of the interviews he wanted to cancel everything and hide. Before each session, he watched a funny video on YouTube to calm himself down.

The phone screens, online assessments, online final rounds, behavioral questions, system design and code. All of this came and went. Today it's all done via video call, where InterviewMan hears the question and puts help during the interview itself on the screen. He was rejected more than once. But somehow planets, asteroids, galaxies, comets and aliens were all lined up at Amazon and the recruiter called him and said he had an offer.

His path can be described in 10 steps: make a plan with timelines, learn the basics first, set a fixed time to study every day, solve only on LeetCode, write down the time and result for each problem, learn from other people's solutions, conduct mock interviews, work on speed and patterns, prepare for system design, and then go into the interviews.

His advice

If you've gotten this far, thank you for reading the whole story. These are the tips he came up with:

  • Make a plan: clear stages, clear goals and clear deadlines.
  • Be prepared to change your path more than once.
  • Measure your level.
  • Don't be naive and expect to know how to act on the day of the interview. Honestly, know what your weaknesses are and work on them.
  • Try it in real circumstances, even if it bothers you. Do mock interviews. Get used to interviewers who annoy you and feedback that annoys you. This will definitely make you stronger.
  • Be committed and study regularly. Write down what you did each day to see that you are really making progress.
  • Reward yourself and be kind to yourself. This topic is very difficult and your efforts deserve a reward. Watch a few minutes of a stupid video on YouTube. Or go to the cafe (or order online) and get the pastries you like.
  • Very few engineers at FAANG companies are geniuses. The rest are normal people like us, and most of them were rejected 2, 3, or even 4 times before they were accepted. In other words, they went down the same path as you.
  • Try to solve the problem yourself before seeing the solution. Just set a time limit, like 2 hours or 1.5 hours. Then look at the solution and write notes about what you learned.
  • The people on LeetCode offer things of great value: explanations, patterns, and other possible solutions.
  • Also, post your solutions, even if they don't look good, and write an explanation next to them. This gets you used to explaining why your solution works. Even if the solution is bad, someone can give you their opinion, and that in itself is a gift.
  • Use fewer methods in your code. If there are 10 ways in your language to read from a hash map, use one or two methods that work in most cases. Do the same with loops, conditions and others. This saves time.
  • Write down the patterns and memorize them well. The BFS level order should be simple enough that you can write it with your eyes closed. Also the hash map that counts how often each element appears. Or BFS on the cells next to each other in the matrix. Or binary search with a loop and all similar forms. You should bring them out at any moment, like a Pokemon Master.
  • Let the interviewer see what they are looking for in the interview. And manage your time. Ask him, “Are we good on time?” And ask questions that get the conversation going: "Is this method suitable? Should I write the code?"
  • Start by solving problems with brute force. If you can't find a faster solution, at least brute force it so the interviewer can see the level of your code. It can make the difference between “weak hire” and “no hire”.
  • The placeholder method helps you a lot, especially when time is short. If your algorithm first needs to create an array of size MxN with distances, put that part in its own method, just write its signature and tell the interviewer what it is doing and that you will write it later and move on! Often for them, the backtracking that comes after is the most important part.
  • Test the code every time without exception. The first try is with a small input and a simple case. Then the edge cases and then more difficult cases. Go through the code line by line. Think of yourself as a debugger in the IDE and track the value of each variable on each line. Make sure the code does what you said.
  • When it comes to system design, reading alone is not enough. Practice drawing a design from scratch on the whiteboard and explain your thoughts out loud. Just as you solve LeetCode every day, study system design every day. If you choose database, partition key, index, real-time, or asynchronous, ask “Why?” 5 times in a row. You must have a reason for every decision and leave no gap in your words.
  • For behavioral questions, use the STAR method. Write down in a file all the places you have worked and what you have done. Then pull situations out of it: projects, successes and failures. Make every situation a story. This point is very important at Amazon because of its leadership principles.
  • Luck makes a big difference, so don't rely on a single company. Do lots of interviews in the same period to increase your chances.
  • Do not give up.
  • Don't be hard on yourself. You are great.

Summary

The whole thing is a journey. Where you end up doesn't matter much. What matters is what you learn along the way. During these months he learned a lot about himself and his abilities. He became a better engineer and began thinking about projects that just a few months ago he had found to be as difficult as rocket science.

If you didn't get there this time, don't be upset. There are many great companies with great people from different backgrounds and you will learn a lot from them.

Download: InterviewMan for Mac, Windows, iPhone, Android and web ($12/mo on the annual plan or $30/mo, with a one-time 20-minute free trial and no card)

Ready to Ace Your Next Interview?

Join 570,000+ professionals using InterviewMan to get real-time AI assistance during their interviews.

Related Articles

Try InterviewMan Free

AI interview assistant. Undetectable.

Get Started