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, быстрый старт по алгоритмам), «Структуры данных» (двоичное дерево, связный список, стек и очередь, побитовые операции), «Базовые алгоритмы» (бинарный поиск, сортировка, динамическое программирование (DP)) и «Алгоритмическое мышление» (рекурсия, скользящее окно, BST, поиск с возвратом (бэктрекинг)). Читать их нужно в этом порядке.
Нужно ли знать Go, чтобы пользоваться этим?Примеры кода написаны на Go, и в репозитории есть раздел с введением в Go, но цель — выучить универсальные шаблоны, которые можно применять на любом языке. Сообщество уже перенесло материал на Python, Java, C++, Swift, JS/TS, Dart и C#.
Сколько времени занимает пройти это до конца?Автор советует потратить около 6 недель на этот репозиторий и карточки LeetCode Explore, а затем ещё 2 недели на «Coding Interviews» (剑指 offer). Итого получается примерно 2 месяца регулярных занятий.
Для кого это?Для разработчиков, которые ищут работу и готовятся к собеседованиям по программированию в крупных технологических компаниях, особенно в Китае. Им нужен структурированный и эффективный способ вместо хаотичной практики на LeetCode.
Какой порядок практики рекомендуется после прохождения этого репозитория?Пройдите оглавление этого репозитория, затем карточки LeetCode Explore, а перед собеседованиями закончите набором задач из «Coding Interviews» (剑指 offer).
Можно ли отметить свой прогресс или показать свою версию?Да, после выполнения плана вы можете отправить pull request с добавлением своей реализации алгоритмического шаблона в таблицу для отметок в README.
Сколько задач решил автор, чтобы получить оффер?Автор примерно за шесть недель дошёл от нуля до около 240 решённых задач, после чего получил несколько офферов, в том числе от крупной технологической компании.
Size
4.1 MB
Stars
15.5K
Updated
CommitMay 30
Age
6y
Commits · 90 Days