Skip to content

Latest commit

 

History

History
89 lines (59 loc) · 3.75 KB

CONTRIBUTING.md

File metadata and controls

89 lines (59 loc) · 3.75 KB

Contributing Guidelines

Thank you for considering contributing to the Competitive Programming Problems repository! Your contributions are highly valued and can help others learn and improve their problem-solving skills. Before you start contributing, please take a moment to read these guidelines to ensure a smooth and collaborative experience.

Table of contents

Getting Started

Before you begin contributing, make sure you have:

  • An active GitHub account.
  • Git installed on your local machine.
  • Familiarized yourself with the repository's structure and problem categories.

Contributing Process

Here's a step-by-step guide on how to contribute to this repository:

Creating a New Branch

  1. Fork the repository to your GitHub account.
  2. Clone your forked repository to your local machine:
git clone https://github.com/your-username/Competitive-Programming-Problems.git
  1. Create a new branch for your changes:
git checkout -b your-branch-name
  • Note: Use a branch name that reflects the problem and the programming language you are using. For example, if you are solving a problem using Python, your branch name could be problem/python.

Adding Solutions

  1. Navigate to the relevant problem category folder, e.g., Cpp, etc.
  2. Create a new folder with the problem's name if it doesn't already exist.
  3. Inside the problem's folder, create two files:
    • problem.md: A description of the problem statement.
    • solution.cpp (or other language extensions): Your solution to the problem in a well-commented code.

Code and Documentation Standards

When adding solutions, please adhere to these standards:

  • Ensure your code is well-commented, explaining the logic and approach.
  • Follow best practices for code readability and maintainability.
  • Include any relevant test cases and expected outputs in the comments.
  • Use descriptive variable and function names.

Note: If you have a different solutions to a single problem or a problem already solved, please create a new file with a name like solution-2.cpp, solution-3.cpp, and so on.

Opening Issues

If you come across any issues with the existing solutions, have suggestions for improvements, or want to request solutions for specific problems, you can open an issue. Make sure to include a clear and concise description of the problem or suggestion.

Pull Request Guidelines

When you're ready to contribute your changes, follow these steps:

  • Ensure that your code and documentation meet the standards mentioned above.
  • Commit your changes and push them to your forked repository:
git add .
git commit -m "Your commit message"
git push origin your-branch-name
  • Create a pull request (PR) from your branch to the main repository. Provide a clear title and description for your PR, detailing the changes you made.
  • Your PR will be reviewed by the repository maintainer. If any changes or improvements are needed, feedback will be provided.
  • Once your PR is approved, it will be merged into the main repository. Congratulations, you've successfully contributed! 🥳

Feedback and Discussions

I encourage open discussions and feedback. If you have ideas for improving this repository, want to discuss problem-solving strategies, or have any questions, feel free to start a discussion in the repository's Discussions section. 😀

Happy coding! 👨‍💻