The benefits of leetcode

/attachments/the-benefits-of-leetcode-header.png

Hello everyone! This time I'm here to invite you, and perhaps introduce you, to the amazing and scaring world of leet code. In case you're not familiar with it, leet code are code challenges where you need to write the solution and submit it for validation against a set of scenarios. It comes with constraints and a specific situation describing the problem, and the task is to write a function or piece of code that solves the problem and gives the answer for the problem.

The main difficulty usually lives in two areas, understanding the problem, and putting the solution into an algorithm. There are levels for these challenges, it can be easy, medium, or hard. Now that you know what I'm talking about, let me tell you why it's a great idea sticking to solving one of these every week.

In short, it teaches you how to think in steps. How to break down big problems into smaller steps. This is particularly interesting because that's what we do on our daily-basis. It helps getting a real problem, a product bug or feature, and shape it in steps, solvable, repeatable, and predictable. But there's more, stick with me.

The real gain

As engineers we need to think straight, logically. We need to find and build solutions on our head, visualizing them first. That is, when we're able to understand the problem, and describe the solution steps, we're done. Nothing else is needed. At this point, we only need to write it down, write the code onto the IDE, or ask an LLM to do it. The hardest part, like I said, it seeing the solution in our head.

Another huge win is that it helps keeping our mind sharp. Many of us, myself included, needs to get back to coding and be close to solution all the time, since in this crazy AI era people are delegating not only code, but also thinking. Don't do that. Take 15 or 20 minutes of your day, and go for a leet code challenge.

Once you see your code approved, the green check is there, and the solution works, it feel good. It just feels very good. I'd say it's as good as seeing an approved PR and all its pipelines passing. Anyways. The point is that you'd get more confident and happy. This goes straight against thoughts like

I'm a fraud

—Almost every developer at any point.

Start with the easy ones, there are many. Then, when feeling ready, go for a medium one. These aren't impossible problems, they only need a bit of thinking. Thank me later.

There are many platforms where you can do it online, using an online IDE. The most known one is for sure LeetCode, but I also strong recommend HackerRank algorithms path, it's really worth it.

That's all for this time. Feel free to share your thoughts using the comments section below, or get in touch (see the about page).

o/