Why Grinding Leetcode is Not Broken
There’s been a lot of discussions recently about how “grinding” leetcode is not the best way to become a better programmer and is a waste of time. Many people seem to believe that if you concentrate all of your effort on practical applications and avoid studying data structure and algorithm (DSA) questions, you’ll be as competent a coder. While I do not believe that a majority of time should be spent grinding leetcode, I believe that DSA questions provide immense benefit and can actually improve your programming skills in a number of ways!
Improved Problem Solving Skills
Developing a strong understanding of data structures and algorithms will not directly improve your coding skills. Instead, developing a strong foundation, and solving DSA challenges will improve your problem-solving skills, which is even more valuable.
When given a leetcode question, you have to analyze the problem, understand what’s being asked, and come up with a solution. This process of breaking down a problem into smaller pieces is an incredibly important skill to have as a programmer. If you can’t solve a problem on your own, being able to communicate your thought process to someone else is also important.
Expands Programming Language Knowledge
Leetcode questions often test for specific language features or specific DSA concepts. Solving these challenges will allow developers to get familiar with the syntax of a language. By solving these types of questions, you can also increase your understanding of fundamental programming concepts. For example, if you don’t know how to use recursion, solving a leetcode question that requires recursion will force you to learn it. Not only will you learn the concept, but you’ll also be able to see how it’s used in a practical setting.
Emphasizes the Importance of Time Complexity
Leetcode questions often have time or space constraints that need to be met in order for the solution to be accepted. This forces you to think about the efficiency of your code and find ways to optimize it. In all fields of programming, being able to write efficient code is an incredibly valuable skill.
Expanded Toolset
By solving DSA questions, you expose yourself to new programming techniques and solutions. When you’re presented with a new problem, you’ll recognize that there are different ways to solve the problem, each with its own tradeoffs. Being exposed to various approaches will expand your toolset, and when you come across challenges in your projects later, you’ll have more tools to utilize to solve the problem.
Conclusion
While I do not believe that a majority of a programmer’s learning should be spent on data structures and algorithms, I do believe that they are an important part of the learning process. By spending time on leetcode, you can improve your problem-solving skills, learn the importance of time complexity, and expand your skillset. These are all precious skills that will help you become a better programmer.
I hope you found this article interesting! Good luck with your coding interviews!






