greyireland/algorithm-pattern: a Go-based template library for LeetCode interview prep
Algorithm Patterns — the most scientific way to practice, the fastest path to an offer. You deserve it~ 算法模板,最科学的刷题方式,最快速的刷题路径,你值得拥有~
At a glance
- What is it?
- Algorithm Patterns is a Go-first collection of reusable problem-solving templates, organised as a reading order rather than a problem list. It is aimed at engineers preparing for interviews at large Chinese tech companies, and its value is the sequence, not the code.
- Who is it for?
- Adopt it if you are preparing for interviews at large Chinese tech companies and want a topic-ordered path through binary trees, linked lists, dynamic programming, sliding windows and backtracking, with Go code you can read and retype. Do not adopt it if you want a graded problem set, per-problem explanations, or any language other than Go in the main tree.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 123 days ago.
- What is it written in?
- Mainly Go, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 29, 2026, and from our analysis. They are not legal advice.
Editorial analysis
The problem it solves is ordering, not knowledge
Most people preparing for coding interviews do not lack material. They lack a sequence. The README describes the author's own experience: going through problems in numeric order meant hitting a hard problem after a few easy ones and getting stuck for a long time. The fix was practising by topic, which the author says lets you "knock out many problems of the same type in a single day".
Algorithm Patterns packages that fix. It is a set of reusable templates grouped under data structures, basic algorithms and algorithmic thinking, with practice problems attached to each article. The intended reader is someone targeting large domestic Chinese companies, which the README abbreviates as BAT and TMD. The README estimates that 200 to 300 problems cover most interview needs at that tier, and that the first two parts of the recommended path take about six weeks.
That estimate is the author's own, drawn from one job search, not a measured result. Treat it as a planning input rather than a promise. The more useful claim is structural: the repository gives you an order and a template per topic, so a problem you cannot solve maps onto something you have already read.
How the templates are organised across the repository
The top-level directories mirror the README's table of contents: introduction/, data_structure/, basic_algorithm/, advanced_algorithm/ and practice_algorithm/. There is also an en/ directory holding the English text, while README_zh.md serves the Chinese audience. SUMMARY.md is present at the root, which is the GitBook table of contents file, and .gitbook.yaml configures the GitBook build. The online documentation lives at greyireland.gitbook.io/algorithm-pattern.
The English tree covers binary trees, linked lists, stacks and queues, and binary or bit manipulation under data structures. Binary search, sorting and dynamic programming sit under basic algorithms. Recursion, sliding window, binary search tree and backtracking sit under algorithmic thinking. Each article, per the README, introduces the thought process and common pitfalls and ends with practice problems.
Two things are worth noting about this layout. First, it is a reading path, not a reference: the README explicitly says to work through the table of contents once and skip anything you get stuck on. Second, the code is Go. The repository is tagged leetcode-go and the primary language is Go, so if you are preparing in Python or Java you will be translating every template by hand. The related searches include "Algorithm pattern python", but nothing in the repository indicates a Python implementation of the templates in the main tree.
Installing and starting with the Go templates
There is nothing to install in the usual sense. The project is documentation plus Go source, so the practical setup is cloning the repository and reading it locally, or using the GitBook site.
Clone the repository and move into it:
git clone https://github.com/greyireland/algorithm-pattern.git
cd algorithm-patternYou should see the top-level directories listed above, including data_structure/, basic_algorithm/ and advanced_algorithm/. The English articles are under en/, so an editor or a markdown reader pointed at en/ gives you the same content as the GitBook site.
The README's recommended path is a three-stage sequence. First, work through this repository's table of contents once, skipping problems you cannot solve. Second, go through the LeetCode Explore basic cards. Third, work through Coding Interviews (剑指 offer) shortly before interviews. The README suggests six weeks for the first two stages and another half month for the third, and notes that you can send out résumés and interview while you practise.
For the Go introduction specifically, the README points to en/introduction/golang.md and en/introduction/quickstart.md. Those two files are where a reader who has never written Go should start, because every template that follows is written in Go.
Where the repository is thin
The README does not document how the practice problems are keyed to the articles, whether solutions are provided, or how to run anything. There is no build step, no test command and no CI configuration described. A src/ directory exists at the top level, but the README does not explain what is in it, and no release has been published.
The bigger limitation is scope. This is one person's distilled notes from one job search, and the README says so directly. It is not a graded problem set with difficulty ordering, and it is not a substitute for a structured course. If you need explanations of why a dynamic programming recurrence is correct, rather than a template you can adapt, this repository will leave gaps. The README's own advice for hard problems is to skip them and come back later, which is reasonable for a job search on a deadline but not for building depth.
Language is the other constraint. A reader preparing in Python or Java gets the pattern, not the code. That is a real cost when the template is the thing you are supposed to internalise.
How it compares with a general interview preparation course
A structured interview course typically pairs each pattern with graded exercises, video walkthroughs and a progress tracker. Algorithm Patterns does the opposite: it gives you a short template per topic and a list of practice problems, and leaves the drilling to you. The README is explicit that "having an idea isn't enough, you still need to write the code yourself".
That difference matters for how you use it. A course decides what you do next. This repository decides what you read next, and you decide how many problems to attach to each template. The README's check-in section, where readers submit pull requests linking their own implementations in other languages, is the closest thing to community structure here, and it is a list of ports rather than a curriculum.
If you already know how to drill and just need a topic order and Go templates, this is a lighter fit than a course. If you need someone to tell you which problem to solve on day nine, it is not.
Maintenance, licence and what an upgrade costs you
The repository is not archived, and the last push was on 2026-05-30. The README describes the roadmap as "continuously updated", but there are no releases, so there is no version to pin and no changelog to read. Upgrading means pulling the default branch and re-reading whatever changed. For a documentation repository that is a low cost, but it also means you cannot tell from a version number whether a template changed.
The licence is MIT. That permits reuse, modification and redistribution provided the copyright notice and permission notice are retained. If you fork the templates into an internal training repository, keep the LICENSE file. This is a description of the licence text, not legal advice; check with your own counsel if you plan to redistribute the content commercially.
The content is written in Markdown with a SUMMARY.md for GitBook, so forking and rebuilding the docs under your own GitBook account is straightforward. There is no dependency to upgrade and no runtime to keep patched.
Editorial conclusion
Adopt it if you are preparing for interviews at large Chinese tech companies and want a topic-ordered path through binary trees, linked lists, dynamic programming, sliding windows and backtracking, with Go code you can read and retype. Do not adopt it if you want a graded problem set, per-problem explanations, or any language other than Go in the main tree. Before committing, open the GitBook table of contents and check that the pattern list matches the interview loop you are actually facing; then verify that the repository's last push date, 2026-05-30, still reflects content you consider current.
Frequently asked questions
What is greyireland/algorithm-pattern?
It is a collection of reusable algorithm templates for interview preparation, organised by topic rather than by problem number. The README describes it as a record of the author's own LeetCode practice distilled into problem-solving templates, with Go code and GitBook documentation.
What language are the algorithm-pattern templates written in?
Go. The repository's primary language is Go and it is tagged leetcode-go, and the README links to en/introduction/golang.md as the starting point. The README does not describe Python or Java versions of the templates in the main tree.
How many LeetCode problems should I solve using algorithm-pattern?
The README suggests roughly 200 to 300 problems for top-tier domestic Chinese companies, based on the author's own experience of finishing 240 problems in about six weeks. It also recommends skipping hard problems you cannot solve and returning to them after building a foundation.
In what order should I work through algorithm-pattern?
The README gives a three-stage path: work through this repository's table of contents once, then the LeetCode Explore basic cards, then Coding Interviews (剑指 offer) shortly before interviews. It suggests six weeks for the first two stages and another half month for the third.
Is algorithm-pattern still maintained?
The repository is not archived and the last push was on 2026-05-30. There are no published releases, so there is no version to track; updates arrive as commits to the master branch.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/greyireland-algorithm-pattern)