Welcome to the Algorithms repository! This repository serves as a curated list of important algorithms across various domains. Whether you're a beginner looking to learn or an experienced developer wanting to contribute, you’re in the right place!
-
Comprehensive collection of algorithms, including:
- Sorting algorithms (e.g., Quick Sort, Merge Sort)
- Searching algorithms (e.g., Binary Search, Depth-First Search)
- Graph algorithms (e.g., Dijkstra’s Algorithm, A*)
- Dynamic programming algorithms (e.g., Knapsack Problem)
- And many more!
-
Each algorithm is provided with:
- Clear explanations
- Sample code
- Time and space complexity analysis
To get started with the algorithms in this repository, you’ll need:
- A C++ compiler (e.g.,
g++,clang) - Basic knowledge of C++ programming
-
Clone the repository:
git clone https://github.com/yourusername/CPP-Algorithms-Collections.git cd CPP-Algorithms-Collections
Thank you for considering contributing to CPP Algorithms! We welcome contributions from the community, whether it's to add new algorithms, improve existing ones, or fix bugs.
-
Fork the repository
- Use the "Fork" button at the top of this repository to create a copy of the project in your GitHub account.
-
Clone your fork
-
Clone your forked repository to your local machine:
git clone https://github.com/yourusername/CPP-Algorithms-Collections.git
-
-
Create a new branch
-
Create a new branch for your changes. Give it a descriptive name based on your contribution:
git checkout -b feature/new-algorithm
-
-
Make your changes
- Add new algorithms or improve existing ones.
- Follow the repository's structure and code style.
-
Commit your changes
-
Once your changes are ready, stage and commit them:
git add . git commit -m "Added [algorithm name]: Brief description of changes"
-
-
Push your changes
-
Push your branch to GitHub:
git push origin feature/new-algorithm
-
-
Create a Pull Request
- Open a Pull Request (PR) from your forked repository to the original repository.
- Write a descriptive title and provide details in the description about what you did.
Please follow these guidelines to maintain consistency across the repository:
- Use proper indentation (e.g., 4 spaces per level).
- Write meaningful commit messages.
- Comment your code to explain non-obvious parts.
- Provide time and space complexity for each algorithm.
By contributing, you agree that your contributions will be licensed under the same license as the project.