Split Your Problems Into Categories

A lot of the difficulty in preparing for coding interviews comes from deciphering the the mess of problems presented to you.
You might be asking, “where do I start?” during this whole process. Fortunately, a lot of ‘difficult’ coding questions are actually fall into a few predictable buckets.
The major categories are as follows:

  • Linked lists
  • Recursion
  • Sorting
  • Trees
  • Graphs
  • Strings
  • Sorting
  • Dynamic Programming

With some ad hoc categories thrown in + problems that combine multiple instances of these. If you can manage to nail some of the more difficult problems in here, then you can make a lot of headway.

Practice… a lot

There is a good amount of learning science that dictates that we learn complex subjects as chunks. These chunks can be as atomic as you like, and combine to form larger and larger chunks.
This should make sense to a software engineer, as we often think in abstractions. Instead of thinking about an entire system as a mess of discrete parts, we understand it as a unified abstraction.
Studying for coding interviews should work the same way. Remember that list above? What we want to do next is compile 3 tiers of questions for each of these subjects (we can think of them as easy / medium / hard).
The main goal is to create a list and tackle as many easy problems as possible for each subject (think about 5 – 10 per section). If these are all a breeze then we move to the next tier (medium).
The idea here is that each level of problem is usually a sum of constituent parts. That is to say that a medium difficulty problem (barring ones with special ‘tricks’) are often combinations of slightly easier problems. The same goes with hard problems. Usually they combine a few different ideas / motifs that you’ve already seen before in easier problems.

Time Yourself

This can be coupled with practice. Once you’ve gone through enough interview problems in the format mentioned above, you need to start treating bouts of your preparation like real interviews.
That means timing yourself when going through interview problems. Only do this in direct preparation for an upcoming interview. If you do this during your study session you will put unnecessary time bounds on yourself, and this will likely hamper your improvement.

Meditate

Some of the noted benefits of this are:

  • Focus
  • Stress regulation
  • Ability to stay in the present

On a more anecdotal note, the real benefit that meditation confers is that of a clear headspace. While that may seem mystical at first glance, the practical benefit worth highlighting here is really that meditation can help lower your anxiety and help you see problems more objectively.

Sleep Well

The most important thing to do before any major life event. Sleep deprivation has a lot of negative effects. It is estimated that being awake for 18 hours is comparable to having a blood alcohol content (BAC) level of .05% (about 2 drinks). Being awake for 24 hours gives you a an equivalent BAC of .10%… so not good.
Worse yet, if you have a poor week of sleep and multiple compounding days they add up. You can sabotage a lot of hard work by showing up to an interview extremely tired.