-
Notifications
You must be signed in to change notification settings - Fork 0
Contributing
nvas222 edited this page Oct 8, 2025
·
1 revision
Thank you for your interest in contributing to this repository of LeetCode solutions! This document provides guidelines and instructions for contributing.
- Add new solutions: Implement solutions for problems not yet covered
- Improve existing solutions: Optimize for better time/space complexity
- Add test cases: Expand test coverage for edge cases
- Improve documentation: Add explanations, diagrams, or better comments
- Fix bugs: Address any issues in existing solutions
- Create tutorials: Help with learning materials and guides
-
Check if the problem is already solved:
- Browse the repository to ensure the problem isn't already implemented
- Check open pull requests to avoid duplicate work
-
Fork and clone the repository:
git clone https://github.com/nvas222/LeetcodeGit.git cd LeetcodeGit -
Create a branch:
git checkout -b solution/problem-name
-
Implement your solution:
- Place the solution in the appropriate difficulty folder
- Follow the existing code structure and naming conventions
- Implement using the
ISolutioninterface - Add XML documentation comments
-
Add unit tests:
- Create comprehensive tests in the Tests project
- Include edge cases and performance benchmarks when appropriate
-
Run tests locally:
dotnet test -
Commit and push:
git add . git commit -m "Add solution for Problem #X: Problem Name" git push origin solution/problem-name
-
Create a pull request:
- Go to the GitHub repository
- Click on "Pull Requests" and "New Pull Request"
- Choose your branch and submit
All solutions should:
- Implement the
ISolutioninterface - Include proper XML comments
- Have comprehensive unit tests
- Specify time and space complexity
- Follow C# coding conventions
- Be well-commented to explain the approach
- Use camelCase for private fields and parameters
- Use PascalCase for class names, methods, and properties
- Use meaningful variable names
- Add XML comments for all public methods and classes
- Follow the Microsoft C# Coding Conventions
- Use clear and descriptive commit messages
- Begin with an action verb (Add, Fix, Update, Refactor, etc.)
- Reference the problem number and name when applicable
- Example: "Add solution for Problem #42: Trapping Rain Water"
Pull requests will be reviewed for:
- Correctness of the solution
- Code quality and style
- Test coverage
- Documentation quality
- Performance considerations
All contributors will be acknowledged in the repository's README or a dedicated CONTRIBUTORS file.
Thank you for contributing to the learning community! Your contributions help others learn and improve their algorithmic problem-solving skills.
If you have any questions, please open an issue or contact the repository maintainer.