I often hear and read on forums and in my LinkedIn feed that solving coding problems yourself, such as LeetCode problems, is the old way, and AI can do it quickly and accurately. And that’s absolutely true. AI can solve a hard-level problem in one minute, while a trained person doing it may take much longer, and their solution is more likely to be suboptimal. But AI writes code faster and more efficiently than the average programmer. So, does that mean we shouldn’t write code at all? This is a controversial question.
If solving LeetCode-style problems is a hobby for someone, obviously they will keep doing it regardless of how much faster and more efficiently AI can solve them, or whether AI exists at all. But a lot of people spend a lot of time solving LeetCode-style problems, not out of love for them.
We can rewrite this question: Why do we need to solve LeetCode problems in the AI era? on: Why do we need to spend our free time solving LeetCode-style problems in the AI era? Or much more detailed:
Why do we need to spend our limited free time solving LeetCode-style problems in the AI era instead of spending it with our families, pursuing our hobbies, or doing something else?
Why spend time on LeetCode problems in the AI era?
Time is a very valuable resource. We need a good reason to spend it solving algorithmic coding problems. And the only real motivation for doing it is finding a job and preparing for job interviews. This is what forces a lot of people to put off other, much more enjoyable things and solve coding interview problems instead. Even now, LeetCode-style problems still exist and, in many cases, are part of the interview process for many IT professionals. From my point of view, preparing for job interviews is the only reason why we need to spend our free time solving algorithmic coding problems. The skill of solving such tasks quickly is almost never needed in day-to-day work.
We can develop the ability to structure our thoughts without spending time on a skill that we won’t need in our actual work. The ability to write compact code, which you develop after solving enough LeetCode-style problems, is more of a disadvantage than an advantage in real-world projects. What matters there is not brevity, but code readability. The ability to use data structures in practice? Yes, that’s a valid point, but this skill can also be developed by solving real-world problems. The ability to analyze algorithmic complexity? If you really need it in your job, you’ll know how to do it. If you don’t, you won’t.
In addition, we need to understand that solving LeetCode problems is a skill. And like any other skill, it fades if you don’t practice it regularly. Motivation can’t last forever either.
So, to repeat my point, the only reason to solve algorithmic coding problems in the AI era is to pass one of the stages of the interview process and get a job.
LeetCode as a skill for technical interview preparation
The ability to pass job interviews is a separate skill that has little to do with what you will actually be doing at work. And this skill needs to be practiced too. An interviewer has very limited time – an hour or two – to decide whether you are a good fit. The better you present yourself, the better your chances of moving forward in the interview process.
And as long as different variations of LeetCode-style problems are used in job interviews, people will continue to invest their free time and effort in learning how to solve these problems as quickly as possible and with the most optimal solution they can find. Because in this case, they aren’t simply wasting their free time – they are investing it in their future.
It should be a focused push for a few months. A period with a clear beginning and end, and a strictly defined deadline. Only in this case will the time and effort spent on LeetCode problems be an investment that pays off rather than time wasted for nothing.
Originally published at https://algobytes.net
