cp-algorithms: the community translation of e-maxx.ru, and how to build it locally
Algorithm and data structure articles for https://cp-algorithms.com (based on http://e-maxx.ru)
At a glance
- What is it?
- cp-algorithms is a volunteer-run, ad-free collection of competitive programming articles, translated from e-maxx.ru and built with MkDocs. It is a reference site, not a library, and its upgrade cost is measured in pull requests, not package versions.
- Who is it for?
- Use cp-algorithms if you want a free, ad-free reference for segment trees, DSU, Dijkstra, DP and number theory, or if you want to contribute a translation or a new article. Do not use it as a dependency: there is no package to install and no versioned release, and the auxiliary library at lib.cp-algorithms.com is a separate site.
- Can I use it commercially?
- Yes, with credit. CC-BY-SA-4.0 allows commercial use as long as you credit the authors and indicate what you changed. It is written for creative content, so check how it applies to any code.
- Is it still maintained?
- Yes. The repository last received commits 4 days ago.
- What is it written in?
- Mainly C++, 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
What cp-algorithms actually is, and who it is written for
cp-algorithms is not a library and not a course. It is a static website of algorithm and data structure articles, published at cp-algorithms.com, whose stated goal is to translate the Russian resource e-maxx.ru/algo and then extend it with new material. The README describes the project as "an ad-free, volunteer-run website that's free for everyone", and the content is aimed at people preparing for competitive programming contests: segment trees, DSU, binary lifting, Dijkstra, digit DP, number theory. The repository itself is the source of that site, not a package you import. If you are looking for a header-only graph library to drop into a solution, this is the wrong address. If you want a written explanation with code samples you can retype and adapt, it is the right one. The e-maxx.ru translation is the origin story, but the README is explicit that the project also wants to improve the collected knowledge by extending articles and adding new ones, so a growing share of the pages is original work rather than a translation.
How the site is generated: MkDocs, Material, and a navigation file
The build is a documentation pipeline, not a compiled program. According to the changelog, the project switched to MkDocs with the Material for MkDocs theme on January 16, 2022, which brought dark mode, better search and more stable rendering of math formulas. The top-level layout confirms this: mkdocs.yml at the root, article sources under src/, custom build logic in hooks.py and plugins/, a preview/ directory, and a test/ directory. Navigation is not derived automatically from the filesystem. The changelog states that navigation was moved to a separate page and that its structure "should be adjusted in navigation.md whenever a new article is created or an old one is moved". That is the single most important structural fact for a contributor: dropping a Markdown file into src/ is not enough. Two more mechanisms sit on top. Tags were enabled on June 8, 2022, marking each article as translated or original, with a tag index at cp-algorithms.com/tags.html; for translated articles a "From: X" tag links back to the original. And since June 7, 2022, each page tracks the date of its last commit and an author list with contribution percentages. That means the site exposes its own provenance, so an out-of-date article is visible as one.
Installing cp-algorithms locally and previewing a page
There is nothing to install in the sense of a package. You clone the repository and build the documentation site. The README points contributors at the How to Contribute page and a Test-Your-Page Form, and the repository ships a test/ directory and a GitHub Actions workflow named test.yml, which is the same check that runs on pull requests. Start by cloning the repository and its submodules, since .gitmodules is present at the top level:
git clone --recurse-submodules https://github.com/cp-algorithms/cp-algorithms.git
cd cp-algorithmsThe site generator is MkDocs with the Material theme, configured by mkdocs.yml. The changelog names both tools, so a local build needs MkDocs and the Material theme installed before the site will render:
pip install mkdocs mkdocs-material
mkdocs serveAfter that, MkDocs serves the site on its default local address and you can open an article in a browser and see the same navigation, tags and math rendering as the published site. The project also offers a hosted preview path: the README links a Test-Your-Page Form at cp-algorithms.com/preview.html, which is the route to use if you do not want to set up a local toolchain. The repository layout suggests the preview/ directory is what backs that form. What you should see after mkdocs serve is the full article tree from src/, with the sidebar driven by src/navigation.md; if a page you added does not appear in the sidebar, the navigation file is the first place to look.
The contribution path, and where it bites
Contributing is a pull request against main. The README links three documents that govern it: How to Contribute, the Code of Conduct, and the Test-Your-Page Form. The build workflow test.yml runs on the main branch, so a pull request that breaks the MkDocs build or the custom plugins under plugins/ will not pass. The friction points are concrete. First, navigation: a new article must be registered in src/navigation.md, and the changelog says the same file must be touched when an old article is moved, which means reorganizing content is a two-file change. Second, provenance: because pages display last-commit dates and contribution percentages, an edit to an existing article is publicly attributed and dated, and a translated article carries a link back to its e-maxx.ru source. Third, language: the project is a translation effort with a progress tracker, and the README badge reports translation progress at 85.2 percent. If you want to write about an algorithm that e-maxx.ru already covers, you are joining a translation queue rather than filling a gap. The changelog also shows the maintainer group changing over time, with new maintainers welcomed in October 2024, so review latency depends on a small volunteer group.
What cp-algorithms is not: no releases, no API, no support contract
There are no retrieved releases for this repository. That is consistent with what it is: a documentation site whose "versions" are commits, not tagged artifacts. You cannot pin cp-algorithms in a dependency file, and you cannot file a bug against a version. The closest thing to a distribution is the published site and its mirrors. The changelog records that a GitHub Pages based mirror is served at gh.cp-algorithms.com and that an auxiliary competitive programming library is available at lib.cp-algorithms.com; that library is a separate site, not part of the article collection, and the README does not describe its contents. There are also RSS feeds, added June 26, 2023, for new articles and for updates to existing articles, which is the practical way to follow changes without watching the repository. Two more limits are worth naming. The articles are explanations with code samples, not a tested implementation you can trust to compile unchanged in your judge environment. And the site is volunteer-run and funded by sponsorship, with the README noting an overhaul of the donation system in August 2025 and a Discord server launched the same month; the project's continuity depends on that volunteer base rather than on a company.
Alternatives, and how they differ in approach
The obvious comparison is e-maxx.ru itself. cp-algorithms began as a translation of that site, and the README frames the relationship that way, with translated articles linking back via a "From: X" tag. The difference is language, maintenance model and extension: e-maxx.ru is the original Russian corpus, while cp-algorithms is the English-language fork that also adds new articles the original does not have. If you read Russian, the original is the source; if you do not, the translation is the only practical entry point. A second comparison is a competitive programming library such as the one hosted at lib.cp-algorithms.com, which the changelog describes as auxiliary. That is a different kind of artifact: a library is code you compile, while cp-algorithms is prose you read and adapt. A third comparison is a general algorithms textbook or an online judge's editorial archive. Those are organized around problems and solutions to specific contests, whereas cp-algorithms is organized by algorithm and data structure, with a navigation page as the index. The trade-off is that you get a durable explanation of a technique instead of a solution to the problem in front of you.
Licence and the cost of keeping a fork
The repository is licensed CC-BY-SA-4.0. That is a content licence, not a software licence, which fits a project whose main output is articles. Two practical consequences follow, without giving legal advice. Attribution is a condition, and the ShareAlike term means that if you republish or adapt the material, the adapted material has to carry a compatible licence. For a team that wants to mirror the site internally, that is a real constraint on how the copy may be redistributed. The upgrade cost is different from a normal dependency. There is no version to bump. If you mirror the site, you re-pull the repository and rebuild with MkDocs, and you inherit whatever changed in src/ and mkdocs.yml since your last pull. If you fork to add your own articles, you own the merge conflicts in src/navigation.md every time upstream adds or moves a page, plus any changes to hooks.py and plugins/ that the MkDocs build depends on. The RSS feeds for new and updated articles are the cheapest way to see what changed before deciding to re-pull.
Editorial conclusion
Use cp-algorithms if you want a free, ad-free reference for segment trees, DSU, Dijkstra, DP and number theory, or if you want to contribute a translation or a new article. Do not use it as a dependency: there is no package to install and no versioned release, and the auxiliary library at lib.cp-algorithms.com is a separate site. Before contributing, read CONTRIBUTING.md and the Code of Conduct, and check src/navigation.md to see where a new page has to be registered. The most concrete thing to verify first is whether the article you intend to write already exists in a translated or original form, because the repository tracks both.
Frequently asked questions
What is cp-algorithms?
It is a volunteer-run, ad-free website of algorithm and data structure articles for competitive programming, published at cp-algorithms.com. The README states that its goal is to translate e-maxx.ru/algo and then extend and improve that collection with new articles.
Is cp-algorithms a library I can install in C++?
No. The repository holds article sources built into a website with MkDocs and the Material for MkDocs theme, and there are no retrieved releases. The changelog mentions an auxiliary competitive programming library at lib.cp-algorithms.com, which is a separate site from the article collection.
How do I preview a new cp-algorithms article before submitting it?
You can build the site locally from the cloned repository, or use the hosted Test-Your-Page Form that the README links at cp-algorithms.com/preview.html. The repository also has a test/ directory and a GitHub Actions workflow named test.yml that runs on the main branch.
Why does my new cp-algorithms page not appear in the sidebar?
Navigation is not generated from the filesystem. The changelog states that the navigation structure should be adjusted in src/navigation.md whenever a new article is created or an old one is moved, so the page has to be registered there.
What licence does cp-algorithms use?
The repository is licensed CC-BY-SA-4.0, a content licence rather than a software licence. It requires attribution and carries a ShareAlike term for adapted material.
How can I follow changes to cp-algorithms without watching the repository?
The changelog records that automatic RSS feeds were added on June 26, 2023, one for new articles and one for updates to existing articles. Both are linked from the README.
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/cp-algorithms-cp-algorithms)