Cracking the Coding Interview like Haseeb Qureshi

You might have worked as a software engineer for many years and produced bunches of software that thousands or even millions of users rely on heavily everyday, but still you cannot invert a binary tree like Max Howell.😅

Today I want to introduce a coding beast Haseeb Qureshi and how you can crack coding interviews like him.

You can go to Haseeb’s linkedin to know more about him, whose story is really interesting and inspiring. He wrote some pretty good articles at his blogger on his journey to be an excellent software engineer. But they would be a little bit too long for you. I just want to give you a short summary regarding the most important parts and give some comments from my perspective.

  1. You must be able to resolve basic and intermediate algorithm problems for a coding interview in most of the cases. Don’t argue with me anymore man, you just have to;
  2. “Watch the Princeton Coursera course on algorithms (by Robert Sedgewick)”;
  3. “Read The Algorithm Design Manual for general algorithms and data structures background”;
  4. “Buy Cracking the Coding Interview. We’ll be using this as a repository of coding problems and solutions.” - Yeah! Time to display ads reasonably;
  5. Practicing on platforms like CodeWars, Leetcode, from easy to medium, then to hard. You need to cover the most popular topics thoroughly. The important thing is “If you’re working on an algorithms problem (such as out of CTCI) and can’t figure it out, spend no more than 20-30 minutes without making progress. Just go look up the answer. Contrary to popular belief, most struggling past 30 minutes is pointless. Try to understand the solution. Walk through it with a debugger if it’s particularly mysterious”, and the even more important thing is “if you didn’t solve the problem completely on your own, treat the problem as though you never solved it at all. Put it back into your rotation of problems. Mark it as something you need to try again from scratch. Wait at least a day, and try to solve it fresh. If you fail, rinse and repeat ad infinitum”, this suggestion is pretty useful as you want to make the best use of your limited time. Sometimes you have no idea what pattern the problem is, you cannot go further even you think about it for 2 or 3 days, you just have to learn first and understand, then forget about the answer, and try to resolve it completely on your own.

IMHO there is no need to do steps of 2, 3, 4 just from beginning to the end, you can just go to step 5 and go to 2,3 when necessary. After that, you can go through step 4 and crack them all.

Hasseb also wrote a good but long article about how he cracked interviews and finally conquered Airbnb: Farewell, App Academy. Hello, Airbnb. (Part II). Read through it if you can.

While I understand that there is no easy shortcut to master a skill, but still you can improve your methodology and use less time to achieve the same goal. Haseeb became a coding beast just in one year, which seems nearly impossible, but as a soccer fan I know that simply repeat some low-level training or play won’t make you grow up, some intensive training, very carefully designed program, would make you totally different in a very short time, that can be true.

I still remember in early 2010, I play soccer every Saturday morning in a small soccer field. I met a kid maybe about 14 years old, he is a joke the first time I saw him. He lost ball control all the time, he cannot make even one successful short pass. Even the gentlest teammate cannot bear him and begin to shout at him ruthlessly. 3 months later, I couldn’t believe I met the same kid. He dribbles through everyone like a boss, and he usually chose the best path to breakthrough, he scored goals like eating breakfast! What the hack?!

If you think that Hasseb’s story is fake and impossible, I would like to say that you just limit your own thought. Methodology improvement matters. I don’t know what kind of training that kid received, but I know for sure it’s not just going out and play easily every Saturday. After reading this blog, what you need to do is just go to CodeWar or Leetcode and register an account, make a plan, practice intensively, patiently and diligently. Wait till the full moon, you will become a coding beast.

PS: If you are using Java as the programming language, you would also need an SSD to save your life, otherwise coding with IDEA or eclipse would be kind of painful. Me got a 250GB Samsung SSD and it works like a charm.