A community-maintained collection of algorithms implemented in Python, intended for learning and education.
krahets/hello-algo
A free, open-source, illustrated data structures and algorithms textbook with runnable code in more than a dozen programming languages.
- Stars
- 130,934
- Forks
- 15,474
- Open issues
- 19
- Last commit
- 14 days ago
What is it?
Hello 算法 is a beginner-friendly introduction to data structures and algorithms, written as an open-source book. It uses animated diagrams to show how each structure and algorithm works step by step, aiming to keep the learning curve gentle for newcomers.
The source code for each topic is provided in many languages, including Python, Java, C++, C, C#, JavaScript, Go, Swift, Rust, Ruby, Kotlin, TypeScript and Dart, and can be run with one click on the website. The book is available in Simplified Chinese, Traditional Chinese, English, Japanese and Russian, and can be read online or downloaded as PDF or EPUB.
The content is maintained publicly, and readers can report errors, submit code translations or help with translation review through GitHub issues.
Key features
- 01Animated diagrams explain how data structures and algorithms work step by step.
- 02Source code can be run with one click on the website.
- 03Code examples are provided in more than a dozen programming languages.
- 04Available in Simplified Chinese, Traditional Chinese, English, Japanese and Russian.
- 05Readable online or downloadable as PDF and EPUB.
Use cases
- Learning data structures and algorithms from scratch.
- Reviewing core algorithm concepts before coding interviews.
- Seeing how a known algorithm is implemented in a language you use.
- Using the book as a teaching resource in a course or study group.
Quick start
- 1
Read the book online at the project website
- 2
Download the PDF or EPUB from the releases page
Things to know
- Content is licensed CC BY-NC-SA 4.0, so commercial use is not permitted.
- The repository is a textbook, not a software library, so there is no package to install into your own code.
In collections
Topics
FAQ
- What is hello-algo?
- A free, open-source, illustrated data structures and algorithms textbook with runnable code in more than a dozen programming languages. Hello 算法 is a beginner-friendly introduction to data structures and algorithms, written as an open-source book. It uses animated diagrams to show how each structure and algorithm works step by step, aiming to keep the learning curve gentle for newcomers.
- Is hello-algo free to use? What license does it have?
- hello-algo is open source under the Other license. Check the license terms before using it in commercial products.
- Is hello-algo still maintained?
- Actively maintained. The last commit to hello-algo was on Oct 10, 2026.
- What can I use hello-algo for?
- Learning data structures and algorithms from scratch. Reviewing core algorithm concepts before coding interviews. Seeing how a known algorithm is implemented in a language you use. Using the book as a teaching resource in a course or study group.
- How do I install hello-algo?
- Read the book online at the project website Download the PDF or EPUB from the releases page
- Where can I get hello-algo?
- The source code and installation instructions are on GitHub: https://github.com/krahets/hello-algo
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A collection of classic algorithms and data structures implemented in Java, intended for learning.
A educational collection of algorithms and data structures implemented in C++17 with no external libraries, spanning math, ML, CS and physics.
A JavaScript collection of classic algorithms and data structures, each with explanations and further reading links.
Go solutions to LeetCode problems with a companion Cookbook e-book, covering data structures and algorithms for interview prep.
A Go template library of competitive programming algorithms and data structures, with solutions to Codeforces and LeetCode problems.