Thank you for considering contributing to LeetCode-Solutions! This repository is a collection of solutions to LeetCode problems in multiple programming languages. Please read the following guidelines to ensure a smooth contribution process.
- Fork the repository: Click on the Fork button at the top right corner of this page.
- Clone your fork:
git clone https://github.com/your-username/LeetCode-Solutions.git
- Create a new branch:
git checkout -b feature/your-feature-name
- Add your solution following the structure below:
- Each problem should be a separate folder named using the format:
Example:
#num - Name - Difficulty
#1 - 2 Sum - Easy
- Inside the folder, include solutions in different languages and a Markdown file explaining the solution. Example:
#1 - 2 Sum - Easy ├── 2 Sum - Solution.java ├── 2 Sum - Solution.cpp ├── 2 Sum - Solution.py ├── 2 Sum - Explanation.md
- Each problem should be a separate folder named using the format:
- Commit your changes: Use the following format for commit messages:
or for explanations:
git commit -m "Solution #num - Creator/Edited - Date - commit #num"
git commit -m "Explanation #num - Creator/Edited - Date - commit #num"
- Push your branch:
git push origin feature/your-feature-name
- Create a Pull Request (PR): Go to the repository on GitHub and click "New Pull Request".
- Follow the folder and file structure as outlined above.
- Commit Messages: Ensure that commit messages follow the specified format.
- Pull Requests: Keep PRs focused and limited to a single problem solution or explanation.
- Discussions: Use GitHub Issues for bug reports, feature requests, or discussions before implementing major changes.
- Documentation: Ensure that the
Explanation.md
file is well-written and clearly explains the approach used in the solutions.
- If you find an issue with an existing solution or have a suggestion, please open an issue.
- When reporting issues, include relevant details such as problem number, expected vs. actual behavior, and language-specific concerns.
By contributing, you agree that your contributions will be licensed under the repository's license.
If you have any questions, feel free to open an issue or start a discussion in the repository.
Happy coding! 🎉