After completing 400 questions in Leetcode, I realized five major experiences

Original link: https://dev.to/durgesh4993/after-solving-400-leetcode-questions-here-are-five-things-that-i-have-learned-c60
Author: Durgesh kumar prajapati
Translator: Mingming Ruyue Senior

After I successfully brushed 400 questions on Leetcode, I gained some valuable experiences that have had a profound impact on my understanding and approach to software development. This article will introduce five lessons I learned from it.

Leetcode is a website that is no stranger to many software developers who are looking for a job. It organizes technical interview questions and solutions from top companies such as Google, Facebook, and Microsoft. However, what is confusing is that more and more small companies are now also adopting interview questions that focus on data structures and algorithms in large numbers, which makes some people question, because they think that "Leetcode ability" is not an accurate measure of them. working strength.

I agree with this point that being good at Leetcode doesn't equate to being a great developer, and in practice, you'll probably never need to invert a binary tree. However, by practicing Leetcode, you will learn a lot of valuable things that will play an important role in your career.

1) The importance of data structures and algorithms
Leetcode does not provide comprehensive data structure and algorithms (DSA) courses, so before using this platform, you need to have a basic understanding of this data structure and algorithms. I strongly recommend that you systematically study the basic courses of data structures and algorithms before brushing the questions. However, once you have laid the foundation on data structure and algorithm (DSA), you will be even more powerful when you go to Leetcode, and brushing questions will also deepen your understanding of data structure and algorithm in reverse.

It is worth mentioning that for any developer, having a solid data structure foundation is extremely important. Recently, a great foreign player successfully shortened the loading time of the game by 70% by making small improvements to the algorithm. Effective implementation of data structures and algorithms can have a profound impact on application performance and stability at scale.


2) There is always someone who knows better than you - learning never stops receive a blow. I've seen some solutions which are even better than the official provided answers. In the process of brushing questions with Leetcode, a lot of what I learned came from careful study of other people's code and incorporating their suggestions into my work.

insert image description here

This notion of "there's always more to learn" applies to my professional life as well. I am fortunate to have experienced colleagues who are willing to generously share their knowledge and help me improve myself. This approach of learning from others allows me to draw on as much of their expertise as possible.

3) Seemingly small details can have a profound impact on your work
Before the official work, errors in the code basically will not have any practical consequences. Bugs that only manifest themselves under specific circumstances can often go unnoticed. But if you are already working, the code will be pushed to the production environment. If your product has a large number of users, any bug that appears in even one extreme case may cause trouble for a large number of users.

insert image description here

Leetcode provides excellent training for this kind of scenario because each problem has hundreds of test cases, which often contain many edge cases. If the edge cases are not handled properly, the code will fail.

Recently, I had to deal with a database that lacked proper constraints, and many rows contained some unexpected values. I'm very grateful for the skills I developed on Leetcode, as it allowed me to identify and fix these issues before they affected the production environment.

4) Diligence is better than talent
"When talent is not being used, hard work is better than talent." This sentence comes from Tim Notke, and it has a profound impact on me personally, especially when using Leetcode to brush questions. I have met many talented developers who struggled with problems of moderate difficulty because they lacked experience and understanding of the problem-solving methods and required tools.
insert image description here

At first, I had trouble solving the simplest problems on Leetcode. However, after taking several data structures and algorithms courses and practicing for a while, I got to the point where I could solve most of the moderately hard problems, and even some hard problems in a reasonable amount of time.

To better improve my Java programming skills, I recently switched Leetcode's problem-solving language from Python to Java. Even though I use Java every day at work, I don't feel comfortable solving these problems. However, I'm not feeling down. I firmly believe that with enough practice, my skills in Java can reach the same level of proficiency in Python.

5) Strategic planning is crucial in software development Planning
is the core of software development and cannot be ignored. Whether it's actually programming or sitting in a formal interview, it's hard not to realize that coding is only one part of the process. Sometimes we tend to fall into such a misunderstanding: after reading the question prompt, we immediately enter the coding stage. This is a common mistake, and it is easy to lead to unsatisfactory results due to insufficient understanding and thinking.

Software development is full of ambiguity and unexpected situations, and programming interviews try to simulate this phenomenon by providing questions that are often vague or incomplete. It is very important to communicate with the interviewer and seek a clear explanation of any uncertainties or limitations. It is recommended to come up with a solution, evaluate its advantages and limitations before starting to code, and start coding only when everyone agrees with the proposed plan.

Otherwise, any necessary changes will not be possible if the solution does not meet the time and space requirements. The same applies to professional environments, as coding can end up in a massive refactoring if one starts coding without properly analyzing the requirements and considering all options.

Conclusion
As an individual, I've been lucky enough to enjoy learning and challenging on Leetcode, even when I'm not looking for a job. However, I also understand that not everyone has the same opinion, and some people may think that it is a waste of time, or that the experience gained by brushing the questions is useless in actual development.

Link to my LeetCode personal homepage: https://leetcode.com/durgesh4993/

Guess you like

Origin blog.csdn.net/w605283073/article/details/131354715