Thank you for considering contributing to the AlgoGenesis C algorithms repository! We appreciate your interest in improving this project. To ensure a smooth collaboration, please follow the steps outlined below.
First, fork the repository to your GitHub account. This will allow you to make changes in your own copy of the project.
- Navigate to the main repository: AlgoGenesis/C
- Click the "Fork" button in the upper right corner.
- You will now have a personal copy of the repository under your GitHub account.
Once the repository is forked, create a new branch in your fork to work on your contribution.
- Clone your fork to your local machine:
git clone https://github.com/YourUsername/C.git cd C
- Create a new branch for your feature or fix:
git checkout -b feature/algorithm-name
Before working on a new feature, algorithm, or issue, it is mandatory to be assigned by a maintainer. This helps avoid redundant work and ensures that the task is aligned with the project goals.
- Navigate to the repository's Issues page.
- If an issue is already open, comment on the issue asking to be assigned.
- If no relevant issue exists, create a new one detailing your proposed contribution and ask for assignment.
Note: Do not start working on an issue until it has been assigned to you by a maintainer.
Once you have been assigned an issue, you can start working on it. Please ensure the following:
- Your code adheres to the C11 standard for maximum portability.
- The code is clean, modular, and well-documented.
- Use comments to explain key sections of the algorithm.
- Include self-checks where applicable to ensure the correctness of your implementation.
It is important that your code is well-tested before submission. Test your algorithm or fix in multiple cases to ensure it behaves as expected.
- Make sure your code compiles without warnings.
- Test your code on both MacOS and Linux systems, if possible.
- If your contribution includes an optimization, compare it against other implementations in the repository (if available).
Once your changes are ready, commit them to your branch.
- Stage your changes:
git add .
- Commit your changes with a meaningful commit message:
git commit -m "Add implementation of algorithm-name"
After committing your changes, push your branch to your fork on GitHub. ```bash git push origin feature/algorithm-name
With your branch pushed, you can now submit a pull request (PR) to the main repository.
- Go to your forked repository on GitHub.
- Click the "Compare & pull request" button next to your branch.
- In the PR description, provide details about the algorithm or fix, why it’s important, and any additional notes.
- Submit the pull request for review.
Once you have submitted a PR, the project maintainers will review your contribution. Be prepared to make revisions if requested.
- PR Review Process: The maintainers will check your code for correctness, style, and adherence to project guidelines. They may request changes before approving the PR.
- New Algorithms: Each algorithm should be self-contained in its own file with a clear filename that indicates the algorithm's purpose (e.g.,
bubble_sort.c
). - Comments and Documentation: Include comments in the code explaining what each section of the algorithm is doing. This helps learners understand the implementation.
- Code Quality: Follow best practices in C programming and ensure the code is optimized for performance and readability.
- Testing: Ensure that the code is thoroughly tested, including edge cases.
- Commit Messages: Write descriptive and concise commit messages that clearly state what your contribution is about.
This project and everyone participating in it are expected to adhere to our [Code of Conduct](link to code of conduct). Please read it to understand the behavior we expect from contributors.
By following these guidelines, you help ensure that the project remains a high-quality resource for everyone in the community. We appreciate your time and effort in making AlgoGenesis better!
- The contributor must wait to be assigned by a maintainer before starting work on any issue or feature.
- Detailed steps are provided for forking, creating branches, committing code, and submitting pull requests.
- Guidelines ensure that contributions are up to standard, including C11 standard adherence, self-checks, and testing.
Feel free to adjust the repository URLs and specific links like the Issues page to fit your actual repo structure. Let me know if you'd like further adjustments!