Thank you for your interest in contributing to Simple DSA! 🎉 This document provides guidelines and instructions for contributing to this repository.
- Contributing to Simple DSA
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers.
Before you begin, ensure you have:
- A GitHub account
- Git installed on your local machine
- Basic knowledge of Git and GitHub
- A code editor (VS Code, Sublime Text, etc.)
- Compiler/interpreter for your chosen programming language
- Registered for Hacktoberfest (if participating)
-
Star this repository ⭐ (Required for Hacktoberfest contributions)
-
Fork the repository
- Click the "Fork" button at the top right of this page
- This creates a copy of the repository in your GitHub account
-
Clone your fork
git clone https://github.com/noodles-sed/Simple-DSA.git cd Simple-DSA -
Add upstream remote
git remote add upstream https://github.com/noodles-sed/Simple-DSA.git
-
Verify remotes
git remote -v
If you find a bug, please create an issue with:
- A clear, descriptive title
- Detailed description of the issue
- Steps to reproduce the problem
- Expected vs actual behavior
- Screenshots (if applicable)
- Your environment (OS, language version, etc.)
We welcome suggestions! To suggest an enhancement:
- Check if the enhancement has already been suggested
- Create an issue with a clear title and detailed description
- Explain why this enhancement would be useful
-
Choose a problem from the README that hasn't been solved in your preferred language
-
Create a new branch
git checkout -b add-solution-q[NUMBER]-[LANGUAGE] # Example: git checkout -b add-solution-q15-python -
Write your solution
- Follow the project structure (see below)
- Add comments explaining your approach
- Test your code thoroughly
-
Update contributors.json
- Add your profile information to the
contributors.jsonfile
- Add your profile information to the
-
Commit and push
git add . git commit -m "feat: Add solution for Q[NUMBER] in [LANGUAGE]" git push origin your-branch-name
-
Create a Pull Request
- Go to your fork on GitHub
- Click "Compare & pull request"
- Fill in the PR template with all required information
- Write clean, readable code with proper indentation
- Add comments to explain complex logic
- Test your solution before submitting
- Follow the folder structure specified below
- Use meaningful commit messages
- One solution per PR - Keep PRs focused
- Update documentation if you add new features
- Be respectful in all interactions
- Submit plagiarized code
- Make PRs for minor typo fixes (unless significant)
- Submit duplicate solutions in the same language
- Create spam PRs for Hacktoberfest
- Include personal information in code
- Submit untested or broken code
Simple-DSA/
├── README.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── SECURITY.md
├── contributors.json
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ ├── feature_request.md
│ │ └── solution_submission.md
│ └── pull_request_template.md
├── C/
│ ├── q1_hello_world.c
│ ├── q2_print_integer.c
│ └── ...
├── C++/
│ ├── q1_hello_world.cpp
│ ├── q2_print_integer.cpp
│ └── ...
├── Java/
│ ├── Q1HelloWorld.java
│ ├── Q2PrintInteger.java
│ └── ...
├── Python/
│ ├── q1_hello_world.py
│ ├── q2_print_integer.py
│ └── ...
└── [Other Languages]/
└── ...
- C/C++:
q[NUMBER]_descriptive_name.cor.cpp- Example:
q15_leap_year.c
- Example:
- Python:
q[NUMBER]_descriptive_name.py- Example:
q15_leap_year.py
- Example:
- Java:
Q[NUMBER]DescriptiveName.java(PascalCase)- Example:
Q15LeapYear.java
- Example:
- JavaScript:
q[NUMBER]_descriptive_name.js- Example:
q15_leap_year.js
- Example:
- Write clean, readable, and well-documented code
- Use meaningful variable and function names
- Keep functions small and focused on a single task
- Add a header comment with:
// Question [NUMBER]: [Title] // Author: [Your Name] // Description: [Brief description of the problem] // Language: [Programming Language]
- Follow PEP 8 style guide
- Use snake_case for variables and functions
- Add docstrings for functions
- Use proper indentation (4 spaces or 1 tab)
- Add function prototypes when necessary
- Free allocated memory to prevent leaks
- Follow Java naming conventions (camelCase for methods, PascalCase for classes)
- Use meaningful class and method names
- Add JavaDoc comments for public methods
- Use const/let instead of var
- Follow ES6+ standards
- Use arrow functions where appropriate
We follow the Conventional Commits specification:
<type>: <description>
[optional body]
[optional footer]
feat: New solution or featurefix: Bug fixdocs: Documentation changesstyle: Code formatting (no logic changes)refactor: Code refactoringtest: Adding testschore: Maintenance tasks
feat: Add solution for Q15 in Python
Added leap year check solution with detailed comments
explaining the algorithm logic.
feat: Add solution for Q25 in C++
fix: Correct logic error in Q10 Java solution
docs: Update README with new language support-
Sync your fork with the upstream repository
git fetch upstream git checkout main git merge upstream/main
-
Test your code thoroughly
-
Review your changes
git diff
-
Ensure all files follow naming conventions
-
Update contributors.json with your information
- I have read the CONTRIBUTING guidelines
- My code follows the project's coding standards
- I have tested my solution and it works correctly
- I have added my information to contributors.json
- My commit messages follow the conventional commits format
- I have updated documentation if needed
- My PR addresses only ONE problem/issue
- I have provided a clear PR description
- Be responsive to feedback and questions
- Make requested changes promptly
- Be patient - maintainers will review your PR as soon as possible
- Do not spam or repeatedly request reviews
If you have questions or need assistance:
- Check existing issues - Your question might already be answered
- Read the README - It contains detailed instructions
- Create a new issue - Use the appropriate issue template
- Be specific - Provide as much detail as possible
All contributors will be:
- Listed in the contributors.json file
- Credited in the project
- Given a shoutout for valuable contributions
By contributing to Simple DSA, you agree that your contributions will be licensed under the same license as the project (see LICENSE file).
Thank you for contributing to Simple DSA! 🚀 Your efforts help make this a valuable learning resource for the community.