Chapter 2 Algorithm Topics

Chapter 2 Algorithm Topics #

I naively thought that after solving all the LeetCode problems completely once, I could complete this book. Facts have proven that this was indeed naive. Because LeetCode adds new problems every day, and sometimes when work gets busy, my progress in solving problems completely cannot keep up with the speed at which new problems are added. Moreover, at my current problem-solving speed, I can only finish 500+ in a year, while LeetCode also updates 400+ problems in a year. It would take at least 5~10 years to finish all the problems. That is too long. So I first set myself a small goal: after 500 problems, I would write the book first, summarize my problem-solving experience at this stage, and exchange ideas with everyone. If I want to finish all LeetCode problems, it seems this book will need to iterate through 5 ~ 10 versions (one version per year).

So in this chapter, I will organize all the topics I have already finished. Problems with similar patterns are placed together. If you want to prepare quickly for interviews, actually solving 2 or 3 problems of the same type is enough. When you are already very proficient with problems of the same type, solving a few more is just wasted effort.

Up to this point, the author believes that dynamic programming is the most flexible type. There is no template you can directly apply to these problems, and this is also where the elegance of algorithms lies. The author believes it is not an exaggeration to call it the art of algorithms. As for the dynamic programming type, the author has not finished it yet, has only solved part of it, and is still learning.

So I will share the problems the author has solved so far, as well as problems with similarities.

Calendar Jun 25, 2026
Edit Edit this page
Total visits:   You are visitor No.
中文