CppAlgorithms is a comprehensive collection of C++ implementations for various fundamental and advanced algorithms. This repository is designed to serve as a valuable resource for students, educators, and developers looking to deepen their understanding of algorithmic concepts through well-organized code examples and detailed explanations.
This repository provides a wide range of algorithms implemented in C++. Each algorithm is organized by category, and every implementation is accompanied by a corresponding Markdown file explaining the algorithm in detail. Whether you're preparing for coding interviews, academic exams, or just want to improve your algorithmic skills, this repository is an excellent starting point.
CppAlgorithms/
├── sorting/
├── searching/
├── data_structures/
├── recursion_divide_conquer/
├── dynamic_programming/
├── greedy/
├── graph_algorithms/
├── string_algorithms/
├── math/
├── geometry/
├── union_find/
└── advanced_data_structures/
Note: Each folder contains C++ implementations of the algorithms within that category, along with Markdown files providing explanations.
- Bubble Sort (Explanation)
- Selection Sort (Explanation)
- Insertion Sort (Explanation)
- Merge Sort (Explanation)
- Quick Sort (Explanation)
- Heap Sort (Explanation)
- Shell Sort (Explanation)
- Counting Sort (Explanation)
- Radix Sort (Explanation)
- Bucket Sort (Explanation)
Clone the Repository:
git clone https://github.com/yourusername/CppAlgorithms.git
cd CppAlgorithms
Navigate to the Algorithm Category:
cd sorting
Compile and Run the C++ File:
g++ bubble_sort.cpp -o bubble_sort
./bubble_sort
Read the Markdown File:
Each algorithm's explanation is available in the corresponding Markdown file (*.md
). These files contain a detailed explanation of the algorithm, including its complexity, use cases, and code walkthrough.
Contributions are welcome! If you'd like to contribute to this repository, please follow these steps:
- Fork this repository.
- Create a new branch (
git checkout -b new-branch
). - Make your changes.
- Commit your changes (
git commit -am 'Add new algorithm'
). - Push to the branch (
git push origin new-branch
). - Create a new Pull Request.
This repository is licensed under the MIT License. See LICENSE
for more information.