Leetcode

Don't grind, bind to your mind

One of the most common mistakes people make in preparation for technical interviews is grinding Leetcode. Mindless grinding serves no purpose. You must make an intentional effort at learning. The goal is understanding.

There are various techniques to this but here are a few to get you started. Set aside a schedule for this. A half-hour every Monday, Wednesday, and Friday. This can be enough if you already have a strong foundation.

First, write down the topics you are strong and weak in. If you've already taken a few algorithms classes, you have an idea. One common topic that people are weak in is recursion or dynamic programming.

Let's say you are weak in recursion. In Leetcode's problem page, set the tag to "recursion". Then sort by difficulty. Pick out around 5-10 problems to work on. Sort by difficulty first. For example:

I have picked out 9 problems, divided by 3 difficulties. Solve one per day. Resist the temptation to do one after another. If you are weak in this, ask yourself - how exactly are you weak? Is it the syntax? Or maybe you just don't know what recursion is?

Doing a problem will shed some light, you should try to pinpoint as best as possible what you are actually weak in. Avoid at all cost memorizing. It'll do you no good in the long run. Especially since it doesn't take very much to change the problem class from one complexity to another with simple constraints.

The language you use to solve this doesn't matter. Python has been recommended but if you want to stand out, use the language you applied for. For example, if the job asks for experienced C++ programmers, then solving the problem using cool STL tricks will help you stand out from the many candidates that used Python.

Last updated

Was this helpful?