C-Plus-Plus README

The project's README from github.com/TheAlgorithms/C-Plus-Plus. As one markdown file: README.md.

The Algorithms - C++ # {#mainpage}

Gitpod Ready-to-Code CodeQL CI Gitter chat contributions welcome GitHub repo size Doxygen CI Awesome CI Income Discord chat Donate

Overview

This repository is a collection of open-source implementation of a variety of algorithms implemented in C++ and licensed under MIT License. These algorithms span a variety of topics from computer science, mathematics and statistics, data science, machine learning, engineering, etc.. The implementations and the associated documentation are meant to provide a learning resource for educators and students. Hence, one may find more than one implementation for the same objective but using a different algorithm strategies and optimizations.

Features

Documentation

Online Documentation is generated from the repository source codes directly. The documentation contains all resources including source code snippets, details on execution of the programs, diagrammatic representation of program flow, and links to external resources where necessary. The documentation also introduces interactive source code with links to documentation for C++ STL library functions used. Click on Files menu to see the list of all the files documented with the code.

Documentation of Algorithms in C++ by The Algorithms Contributors is licensed under CC BY-SA 4.0
Creative Commons LicenseCredit must be given to the creatorAdaptations must be shared under the same terms

Contributions

As a community developed and maintained repository, we welcome new un-plagiarized quality contributions. Please read our Contribution Guidelines.

C-Plus-Plus (TheAlgorithms/C-Plus-Plus)

Searching Database…

What is this?This is TheAlgorithms/C-Plus-Plus, an open-source collection of algorithm implementations in C++ covering computer science, mathematics, machine learning, and physics, built as a learning resource rather than for production use.
Is this a library I install, or just a collection of source files?It's not a single installable library — it's a repository of individual, self-contained C++ source files, each implementing one algorithm so you can read, compile, and reuse it on its own.
How do I actually use one of these algorithms?Browse or clone the repository, pick the algorithm file you need, and compile it directly with a C++17-compliant compiler — there's no build system or package to install.
Do I need any external libraries to compile these?No — every implementation relies only on the C++ Standard Template Library, with no third-party dependencies required.
Is this meant to be production-grade code?No, it's explicitly a learning resource — expect multiple competing implementations of the same algorithm using different strategies rather than one 'blessed' optimized version.
Who is this collection really aimed at?It's aimed at students and educators who want readable, well-documented reference implementations of classic algorithms rather than a ready-to-ship library.
Does the code actually work across different operating systems?Yes — every commit is compiled and tested on Windows, macOS, and Ubuntu (Linux) using MSVC, AppleClang, and GNU GCC respectively.
What are the license terms for the code and docs?The source code is MIT licensed, while the auto-generated documentation itself is released under CC BY-SA 4.0.
What topics does it cover besides classic sorting and searching?Beyond standard CS algorithms, it spans mathematics, statistics, data science, machine learning, and general engineering problems.
Where can I read documentation for a specific algorithm?The project auto-generates online documentation directly from the source code, including snippets, execution details, and diagrams of program flow.
Will this code run on microcontrollers like ESP32?Very likely — the strict C++17 compliance is specifically meant to let the code port to embedded platforms like ESP32 or ARM Cortex with little to no changes.
Size
140.7 MB
Stars
34.8K
Updated
CommitOct 03
Age
10y
Commits · 90 Days