Optimize your studying with the Three Pillars of Coding Interview Prep

Three Pillars of interview prep

“The only way to succeed in your interview is to start studying at least one year in advance.”

Lol.

I don’t know how often I read advice like this. Sometimes it’s “3 months in advance”, sometimes it’s “6”, but whatever the number is, it is patently wrong.

The amount of time you need to study to be successful at your interview is however much time you have to prepare. The purpose of studying is not to prepare for everything. The purpose is to optimize the time you spend to get the most results. As XKCD so eloquently put it:

xkcd dfs

Now I’m not saying that you can start studying the night before your interview and expect to do amazing. Maybe you’ll do okay, but giving yourself at least a week, and ideally a month or two, would be much better. What I am saying, however, is that by studying smart rather than studying as much as possible, you can use your time much more efficiently and get on with your life.

Now you might be asking, but how do I do that? How do I make the most of my time studying. For that, let me introduce my Three Pillars of Coding Interview Prep. By focusing on these Three Pillars — data structures and algorithms, practice interview questions, and mock interviews — you will be able to maximize your practice efforts and get back to your life.

The Three Pillars

There are 3 key areas to work on when preparing for a coding interview. Each is fundamental to getting yourself fully prepared for your interview and if you miss any of them, it will leave you with serious gaps in your preparation. These pillars are data structures and algorithms study, practice problems, and mock interviews.

Data structures and algorithms

This is hands down the least sexy part of studying for an interview and the one that most people tend to gloss over. After all, who really wants to sit down with a textbook and go through different algorithms all day?

However, this knowledge forms the backbone of everything that you will do in a coding interview. Without knowing your basic data structures and algorithms, how can you expect to solve problems using them?

When studying, focus on core data structures and algorithms. Review hash tables, trees, linked lists, and other fundamentals. You don’t need to study everything. For example, don’t study A* search and machine learning. The chances of it coming up in an interview are just too small.

As you study, I recommend implementing core parts of the data structures and algorithms you come across. This will help cement them in your mind and also teach you common techniques for solving various types of problems. If you know how to delete a node from a binary tree, then the same techniques may apply in many other cases.

Finally, use the Teddy Bear Technique. This is a great way for you to decide whether or not to continue studying or move on to a new topic. You test yourself by explaining what you’ve been learning to an inanimate object, like a teddy bear. This helps to highlight the gaps in your own knowledge.

To learn more about how to study data structures and algorithms, as well as the Teddy Bear technique, check out this blog post.

Practice problems

Probably the single most productive way to study for your interview is by doing practice problems. While doing well in your interview isn’t about memorizing solutions, there tend to be a small number of common techniques that work for a wide range of problems.

If you pick a good range of problems, like those on this site or in Cracking the Coding Interview, you are almost guaranteed to see similar problems during your interview. Having the techniques in your back pocket will make it much easier for you to whip out a great solution to the problem.

How you study practice problems, however, is critical. It isn’t going to cut it to just read through questions and solutions. If you want to really do well in your interview, you need to internalize the techniques and how to derive them.

There are a couple things that you should do to maximize your study time.

  • Go through problems on different topics to see what you need to study
    This is a great way to determine what areas you should actually devote your time and energy to. The idea is to do one practice problem in each major topic that you need to know and use your performance to judge where you need to study further. This can help you to focus on the topics where you need the most practice and not waste time on those you already know very well.
  • Really study, don’t just breeze through problems
    Just looking at the solutions for each problem isn’t going to cut it. The goal with going through practice problems is to internalize the techniques so that you can apply them to other problems in your interview. Really understand why the solution is what it is. Are there other solutions that could work as well? Take some time to try to solve the problem yourself first, but if you do refer to the solution, really study it.
  • Write down solutions on paper/practice like a real interview
    Practicing with pen and paper (or even better, a whiteboard) will kill two birds with one stone. Not only do you need to be able to solve these problems in your interview, but you’ll need to be able to write out the solution by hand. This turns out to be one of the biggest stumbling block for people, so it is great to get out ahead of it. Also practice talking out your thought process as you work through a problem. It’s harder than you think.
  • Work on harder problems
    You can’t improve by practicing problems that you’re already good at. While they very well may come up in an interview, are you learning anything by going over them again? The best way to maximize your time is to pick hard problems that force you to really think about them. Spending half an hour or an hour playing around and experimenting with different solutions is one of the best ways to learn quickly.

By following these tips, you’ll be able to go into an interview and immediately recognize familiar patterns and solve problems with much greater ease than if you simply skim over tons of different questions and read through the solutions.

Mock interviews

The biggest stumbling block that I see for people in both practice and real interviews their ability to express themselves in a clear way and describe their thought process in a way that I can understand what they’re thinking.

The problem is that to most of these people, this isn’t obvious. They know exactly what’s going on in their head, so they don’t realize that I, as the interviewer, am hopelessly confused by what they are doing. That means that even if they wrote awesome code, I am much less likely to recommend making them an offer.

In short, there are some issues that you won’t catch by yourself. That is why mock interviews can be so useful.

Mock interviews are a chance to learn how exactly you are perceived by your interviewer. Do you seem like you know what you’re doing? Did you explain your thought process clearly?

It is also a good way to learn how to interact with another person during your interview. In an actual interview, you’ll need to ask clarifying questions. You should talk through your code as you write it. Your interviewer may provide tips and guidance along the way. Getting accustomed to these things will make your actual interview a less jarring experience. Simply practicing interviewing as you will for your real interviews will make you more comfortable and make the interview go much more smoothly when it comes time for the real interview.

I recommend that you try to do a mock interview as early along in your interview prep process as possible. Even if you haven’t had a lot of time to study, mock interviews can be a great way to direct your preparation as you move forward. Getting feedback early on can make it clear what you need to work on, and for those who haven’t done coding interviews before, after a mock interview, you will understand much better how the process works.

Mock interviews are also helpful towards the end of your interview prep as your real interview is approaching. They can help get your nervousness out of the way, as well as refine the techniques that you have been practicing.

If you are interested in doing a mock interview, I offer mock interviews!

Sample Interview Prep Timeline

Here are sample timelines if you have 2 weeks to prepare and if you have a month to prepare. My assumption is that you will spend about half an hour studying each day. While you don’t have to follow this exact outline, more than anything else, it should give you a better idea of how to divide your time.

1 Month

  • Week 1
    Do a mock interview and review feedback.
    Do 1-2 practice problems in each major topic.
    After doing practice problems, rank topics in terms of how well you understand them and can solve problems related to them.
  • Week 2
    Begin studying topics, starting with those you need the most work with and moving towards those you know the best. Use the techniques described here.
  • Week 3
    Practice, practice, practice. Do as many practice problems as you have time to do well. Focus on quality over quantity. Try to emulate an actual interview by writing code with pen and paper, talking out loud, and timing yourself. Focus on harder questions and those in topics that you had to study.
  • Week 4
    Do more mock interviews. The more, the better.
    Briefly review all study topics. Cracking the Coding Interview is good for this.
    Continue to do practice problems.
    Make sure you have a few questions to ask your interviewer.
    Check out this article about last minute interview prep.

2 Weeks

  • Day 1
    Do a mock interview and review feedback.
  • Days 2 – 5
    Do 1-2 practice problems in each major topic and rank topics by level of understanding.
  • Days 6 – 8
    Study the topics you don’t understand as well. Go for breadth over depth and make sure to at least touch on every topic that you need work on.
  • Days 9 – 14
    Do practice problems. Focus on quality over quantity.
    Do another mock interview if you have time.
    Make sure you have a few questions to ask your interviewer.
    Check out this article about last minute interview prep.

Your goal when preparing for an interview should always to focus on making the most of your time. To do that, I recommend focusing on the Three Pillars: Data structures and algorithms, practice questions, and mock interviews. Working on these and not worrying about anything else, you’ll be able to ace your interviews, and then get on with your life.

Get Free Stuff!

Sign up now and I'll send you weekly emails with more content like this.

We won't send you spam. Unsubscribe at any time. Powered by ConvertKit