Guide · Open source
How to use algorithm-base: read the animated algorithm notes
Updated · written with AI from the project's own documentation and checked against our catalogue data
algorithm-base is a set of study notes by chefyuan that explain data structures and algorithms, such as hash tables, linked lists, trees, sorting and string matching, using step-by-step animations and diagrams. This guide shows you how to find your way around the repository, read the notes in a sensible order and use the interview problem lists. Most of the material is in Chinese.
Quick start
- 1Decide whether you can read Chinese. The README and the linked notes are in Chinese. If you cannot read Chinese, choose a different resource before you start.
- 2Open the notes. Read online at www.chengxuchu.com, or clone the repository with git clone https://github.com/chefyuan/algorithm-base to read the Markdown files locally.
- 3Start with the data structure notes. Work through the prerequisite notes on hash tables, stacks and queues, linked lists, recursion and trees.
- 4Study sorting and string matching. Read the animated notes for sorting algorithms and for BF, BM and KMP string matching, following each animation step by step.
- 5Practise with the problem lists. Pick a topic, attempt the linked LeetCode or Jianzhi Offer problem yourself, then compare your solution with the write-up.
What is in algorithm-base?
The repository is a collection of reading materials, not a program. Its notes cover data structures (hash tables, stacks and queues, linked lists, recursion and binary trees), string matching (BF, BM and KMP), and sorting algorithms (bubble, selection, insertion, shell, merge, quick, heap and counting sort).
It also groups LeetCode and Jianzhi Offer interview problems by topic, such as arrays and sorting-based problems, and each problem links to its own write-up.
- Data structures (prerequisites): hash tables, stacks and queues, linked lists, recursion, trees
- String matching: BF, BM and KMP
- Sorting: bubble, selection, insertion, shell, merge, quick, heap, counting
- Binary tree traversals: iterative and Morris versions
- Problem lists: sorting-based problems, linked list, arrays (for example LeetCode 1 Two Sum and Jianzhi Offer 3)
Read online or clone the repository
The README recommends reading online at www.chengxuchu.com because it is more stable than the GitHub files. If you want the notes on your own computer, clone the repository with git.
The notes are Markdown files stored in folders such as animation-simulation, so you can open them in any editor or Markdown viewer.
git clone https://github.com/chefyuan/algorithm-baseStudy in a sensible order
The README lists the data structure notes first and marks them as prerequisites. Read those before the sorting, string matching and tree sections, because the later notes assume you already know how arrays, linked lists and trees work.
Within each section, read the animation or diagram first, then work through the code and the summary. Pause at each step and predict what happens next before reading on.
- Start with hash tables, stacks and queues, linked lists and recursion
- Then move to binary trees and traversals
- Next cover sorting and string matching
- Finish with the problem lists, which apply these ideas to interview questions
Use the problem lists for interview practice
The problem lists are grouped by topic rather than by difficulty. Pick a topic you have just studied, open the linked problem write-ups and compare your own solution with the step-by-step explanation.
The lists also link to related problems such as LeetCode 27 (remove element) and LeetCode 41 (first missing positive), so you can practise a topic on several problems in a row.
- Choose one topic from the lists
- Attempt the problem yourself before reading the write-up
- Compare your approach with the animated explanation
Know what the repository does not offer
algorithm-base has no install step and no runnable software or library. Its notes are written in Chinese, and the README and linked notes are in Chinese, so readers who do not read Chinese will find it hard to use.
If you want English-language or interactive learning material, compare it with the other projects in the same space, such as labuladong/fucking-algorithm and Hello Algo.
What people use it for
- Preparing for a Chinese-language coding interview by studying sorting and linked list problems
- Learning how KMP string matching works through a step-by-step diagram
- Reviewing binary tree traversals, including the iterative and Morris versions
- Working through array problems grouped by topic before an interview
Frequently asked questions
How do I install algorithm-base?
There is nothing to install. The repository is a set of notes. You can read them online at www.chengxuchu.com or clone the repository with git clone https://github.com/chefyuan/algorithm-base.
Is algorithm-base free to use?
Yes. The repository is licensed under MIT, which allows you to use and share it under the terms of that licence.
Do I need to read Chinese to use algorithm-base?
Yes. The README and the linked notes are written in Chinese. Readers who do not read Chinese will find the material hard to use.
Does algorithm-base include runnable code or a library?
No. It is a collection of reading materials with animations and diagrams. It is not a runnable program or a library you can install.
What are the alternatives to algorithm-base?
Projects often compared with it include LeetCode, labuladong/fucking-algorithm and Hello Algo. LeetCode is a problem platform, while the other two are study materials.
Why should I read the online version instead of the GitHub files?
The README recommends the online version at www.chengxuchu.com because it is more stable. The notes are the same content, but the online version avoids some GitHub file-viewing issues.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
algorithm-base suits Chinese-speaking developers who want visual, step-by-step explanations of data structures, sorting and string matching before coding interviews. It is not a good choice if you do not read Chinese or need software you can run and extend, in which case LeetCode or an English-language study project will fit better.
Install options & downloads