algorithm-pattern README

The project's README from github.com/greyireland/algorithm-pattern. As one markdown file: README.md.

Algorithm Patterns

English | 中文

Let's grind LeetCode

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

Online docs on Gitbook: Algorithm Patterns 🔥

Core Contents

Getting Started 🐶

Data Structures 🐰

Basic Algorithms 🐮

Algorithmic Thinking 🦁

Reflections

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).

240 problems in a month and a half

Practice record

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~

  1. algorithm-pattern practice problems

Practice problems

  1. LeetCode Explore cards

Explore cards

  1. Coding Interviews (剑指 offer)

Coding Interviews

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~

Interview Resources

Here are some classic computer science books, most of which should help with interviews. Highly recommended 🌝

The 100 books I've read

Roadmap

Continuously updated. If you find it helpful, please drop a star ⭐️~

【 Github 】https://github.com/greyireland/algorithm-pattern ⭐️

Check-ins

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~

Done User Project
✅ easyui algorithm-pattern-swift (Swift), Gitbook docs
✅ wardseptember notes (Java)
✅ dashidhy algorithm-pattern-python (Python)
✅ binzi56 algorithm-pattern-c (C++)
✅ lvseouren algorithm-study-record (C++)
✅ chienmy algorithm-pattern-java (Java), Gitbook docs
✅ ligecarryme algorithm-pattern-JavaScript (JS+TS)
✅ Esdeath algorithm-pattern-dart (Dart), Gitbook docs
✅ longpi1 algorithm-pattern-golang (Go)
✅ tpxxn algorithm-pattern-CSharp (C#)

algorithm-pattern (greyireland/algorithm-pattern)

Searching Database…

这是什么?这是一套精选的可复用“算法模式”(模板)合集,用于高效解答编程面试题,内容整理自作者求职期间在 LeetCode 上的刷题经验。
这是编程库还是学习指南?这是一个学习笔记仓库(外加一个在线 Gitbook),而不是可以导入使用的代码库。它讲解各种模式,并提供练习题供你自己动手解答。
内容是怎么组织的?我该从哪里开始?内容分为:入门(Go 语言入门、算法快速上手)、数据结构(二叉树、链表、栈/队列、位运算)、基础算法(二分查找、排序、动态规划)、算法思维(递归、滑动窗口、二叉搜索树、回溯)。建议按此顺序阅读。
我得会 Go 才能用这个吗?示例代码使用 Go 编写,仓库也包含 Go 入门章节,但目标是学习可以在任何语言中应用的通用模式。社区已有分支将其移植到 Python、Java、C++、Swift、JS/TS、Dart 和 C#。
真正学完这套内容要多久?作者建议:用大约 6 周时间学完本仓库和 LeetCode Explore 卡片,再用 2 周刷“剑指 offer”,总共大约坚持练习 2 个月。
这是给谁准备的?面向正在准备编程面试的求职开发者,尤其是想进入中国大型科技公司的人,他们希望用一种有条理、高效的方式替代漫无目的地刷 LeetCode。
学完这个仓库后,推荐的练习路线是什么?先过一遍本仓库的目录,然后刷 LeetCode Explore 卡片,最后在面试前完成“剑指 offer”题集。
我能提交自己的进度或版本吗?可以。完成学习计划后,你可以提交 Pull Request,把自己的算法模式实现添加到 README 中的打卡表里。
作者为拿到录用通知刷了多少道题?作者从零开始,大约六周内刷了约 240 道题,之后收到多个录用通知,其中包括一家大型科技公司的。
Size
4.1 MB
Stars
15.5K
Updated
CommitMay 30
Age
6y
Commits · 90 Days