English | 中文
Algorithm patterns — the most scientific way to practice, the fastest path to an offer. Go from beginner to offer in one month. You deserve it 🐶~
As the name suggests, "algorithm patterns" are reusable templates for solving problems. Once you master them, grinding problems actually becomes fun~
This project is a record of my own journey grinding LeetCode from scratch while job hunting. Through countless articles, columns, and videos, I distilled a set of problem-solving templates of my own.
These templates mainly cover general-purpose patterns, along with common questions such as: how many problems should you actually solve, in what order, and how to practice more efficiently.
Online docs on Gitbook: Algorithm Patterns 🔥
Most articles introduce the thought process behind each problem along with analysis of common pitfalls. Having an idea isn't enough — you still need to write the code yourself, so every article ends with corresponding practice problems.
After finishing these practice problems, you'll have developed your own understanding of data structures and algorithms, and you'll be able to solve most interview questions. The big domestic companies (BAT, TMD) should no longer be a problem.
Starting my job search in April, I went from zero to grinding LeetCode, finishing 240 problems in about a month and a half (6 weeks).
When I first started, I really didn't know where to begin. Going in numeric order, I'd hit a hard problem after just a few and get stuck for a long time. Later I read the comments to see how others practiced and Googled the best approach, and discovered that practicing by topic is much more comfortable — you can knock out many problems of the same type in a single day. Gradually, grinding stopped being tedious and became genuinely interesting, and in the end I received some solid offers (I eventually joined one of the giants).
Back to the original question: how many problems do you actually need to solve for interviews? It depends on the kind of company you're aiming for. If your target is a top-tier domestic company, roughly 200 to 300 problems should cover most interview needs. The second question — what order to practice in and how to improve efficiency — is exactly the purpose of this repo: it gives you a problem-solving order and a set of templates. With direction and technique in hand, just get started~ I hope that after finishing, you'll also be able to summarize a set of templates of your own, gaining real growth along the way~
Work through this repo's table of contents once; if you get stuck on a problem, skip it for now. Then go through the LeetCode Explore basic cards once, and finally, right before interviews, work through "Coding Interviews" (剑指 offer).
Why this order? The problems in this repo are grouped by type — they're common, high-frequency, and representative, and most can be solved with a template plus a small variation. After finishing, you'll have a basic grasp of most problems. Then the Explore cards reinforce and consolidate fundamental concepts. Finally, "Coding Interviews" is the source of many companies' interview questions; after finishing it you'll often encounter the exact problems or variations in interviews. Get through these three parts and most domestic company interviews should be no problem~
Budget your time sensibly. If you're preparing for interviews, I suggest finishing the first two parts in a month and a half (6 weeks), and the final "Coding Interviews" part in another half month. You can send out résumés and interview while you practice. Don't panic when you hit something you can't solve — just map it onto a template. And if an interviewer gives you a hint, take it and run — don't miss the opportunity~
Note: if you're grinding for a job, tackle hard problems when you have an idea; if you don't, skip them for now. Build a solid foundation first, then come back to the hard ones — it'll likely be more effective~
Here are some classic computer science books, most of which should help with interviews. Highly recommended 🌝
Continuously updated. If you find it helpful, please drop a star ⭐️~
【 Github 】https://github.com/greyireland/algorithm-pattern ⭐️
After completing the plan, you can submit a Pull Request and add your own repo below to check in with your own algorithm-pattern implementation~





