Recently, the business is busy, and I have made up the automation interface case left by last Q, so I have less time for system learning algorithm in the evening.
Also, I just bought horizon 4 on Steam and couldn’t stop playing it.
But it hasn’t been nothing lately. It is said that learning can be used in practice. Before watching the video reading to understand the linked list binary tree, but the specific can do what, how to use, or two eyes a black. But fortunately, get strange brother advice, share to me another algorithm learning public number “Labuladong”, which has a lot of actual points of the algorithm, interested can go to search. I followed the guidance, feel also have to brush the question is the right way, after all, learn this thing is for the future interview, or have to combat.
1. LeetCode’s recollection of three minutes’ persuasion
Speaking of LeetCode, this brings back painful memories of my past, and perhaps I’m not alone. I remember the first time I opened LeetCode and wanted to do the problem. It must be the same as the trend. At that time, I heard that all the big shots went there to do the problem. Then, I don’t know why I also want to try, the results open the topic, no ideas.
Finally, finally encountered one of those cycles can solve the problem, after solving a brain sweat. It turns out that when you look at the problem, you realize that your algorithm is bad, and someone else is more efficient with hashing. That’s good. It opens up a new intellectual blind spot.
Next, continue to open a new topic, the mind is a blank, can not help but want to see the solution. The solution to the last look at it, understand the cost of a long time, the final result is to persuade to retreat.
In fact, now that I think about it, I would have challenged the algorithm in that case, and that was the only result. Moreover, it will further increase your fear of algorithmic problems. And the source of all this, is their own ignorance, and the wrong learning method.
You can’t walk, and you want to run?
Second, algorithm learning and brush questions complement each other
Now the situation must be better than before, although it is still small, but compared with my previous progress, at least now I am not so afraid of LeetCode brush problems.
Why is that?
Fear usually comes from the unknown. I didn’t know the data structure and algorithm at all, so I couldn’t do it. Now, by learning data structure step by step, I know that these things are not so mysterious as I thought before. It is just adding, deleting, changing and checking data when playing.
In the algorithm mentioned above in the public account, I learned that the brush questions are set, there is a framework to solve the problem, all changes do not leave its ancestor. The author recommends starting with the topic of binary tree to cultivate the perception of this kind of routine. In the case of binary trees, it’s basically the same three types of traversal: pre-ordered, middle-ordered, and post-ordered. Get a topic above all is not panic, carefully examine a topic, what is to want me to do after all? How can I achieve this effect, and finally decide which traversal frame is appropriate.
In this way, interspersed with some simple problems. After all, it is still a small white, have to start from easy mode, the most important thing is to cultivate a good correct thinking to solve problems, completely eliminate the LeetCode
Fear.
After the algorithm learning, I decided to combine the theory with brush. Grasp the basic knowledge of data structure first, and then to solve some related algorithm problems, the effect will be much better. For example, if I didn’t know what a linked list was, I would have wondered how to delete the node like an array.
Three, about looking at the problem solution
As for reading the solution, I think there may be people who force themselves to do it before they can read the solution. In fact, I don’t think it’s necessary to do this, at least for the white stage.
Since they are all white, it is very normal to do not come out, at this time to see the solution of the problem, maybe you can make it clear. At this time to experience other people’s solution ideas, and the application of this kind of problem. So, the next time we have a similar problem, we should basically be able to do it.
How else is it called brush? As long as it is done by heart, I believe that quantitative change can produce qualitative change.