Skip to content

Latest commit

 

History

History
111 lines (72 loc) · 3.42 KB

CONTRIBUTING.md

File metadata and controls

111 lines (72 loc) · 3.42 KB

Contributing to LeetCode Python Solutions

Thank you for considering contributing to this repository! Your contributions help make this project better and more comprehensive for everyone. Follow the guidelines below to ensure a smooth contribution process.


📜 Table of Contents


Getting Started

  1. Ensure you have Git installed on your system.
  2. Familiarize yourself with the structure of this repository.
  3. Make sure you have a GitHub account. If not, you can create one here.

How to Contribute

1. Fork the Repository

Click the Fork button at the top-right corner of this repository to create a copy of it in your GitHub account.

2. Clone Your Fork

Clone your forked repository to your local machine using the following command:

git clone https://github.com/<your-username>/LeetCode-Python-Solutions.git

3. Create a New Branch

Create a new branch for your contribution. Use a descriptive name for your branch:

git checkout -b add-solution-<problem-id>

4. Add Your Contribution

  • Navigate to the appropriate folder in the Solution/ directory.
  • Add your solution file (e.g., problem-id.py) and update the readme.md file in the corresponding folder.
  • Ensure your code is well-documented and follows the repository's coding style.

5. Commit Your Changes

Commit your changes with a meaningful commit message:

git add .
git commit -m "Add solution for problem <problem-id>: <problem-title>"

6. Push to Your Fork

Push your changes to your forked repository:

git push origin add-solution-<problem-id>

7. Submit a Pull Request

  1. Go to the original repository on GitHub.
  2. Click the Pull Requests tab.
  3. Click New Pull Request.
  4. Select your branch and submit the pull request with a detailed description of your changes.

Contribution Guidelines

  1. Follow the Repository Structure: Ensure your contributions are added to the correct folder.
  2. Write Clean Code: Use meaningful variable names, add comments, and follow Python best practices.
  3. Update Documentation: If you add a new solution, update the corresponding readme.md file with the problem description, examples, and your solution.
  4. Test Your Code: Ensure your code runs without errors and passes all test cases.
  5. Be Respectful: Follow the Code of Conduct.

Code of Conduct

We are committed to fostering a welcoming and inclusive environment. By participating in this project, you agree to abide by our Code of Conduct.


Need Help?

If you have any questions or need assistance, feel free to:

  • Open an issue in the repository.
  • Reach out to the maintainers via GitHub.

Thank you for contributing! Together, we can make this repository a valuable resource for the coding community.