Welcome to my LeetCode solutions repository! This is a comprehensive collection showcasing problem-solving journey across various topics and difficulty levels. This repository is open for Hacktoberfest 2025 contributions! ๐
-
Diverse Topics:
Solutions covering various areas:- ๐ฅ Arrays
- ๐งฉ Strings
- ๐ณ Trees
- ๐ Graphs
- โ๏ธ Dynamic Programming
- ๐งฎ Mathematics
- ๐ ๏ธ Bit Manipulation
-
Difficulty Levels:
Problems categorized into:- ๐ข Easy
- ๐ก Medium
- ๐ด Hard
-
Learning Journey:
Each solution includes:- ๐ง Thought processes and approach
- ๐ Algorithms and data structures used
- โฑ๏ธ Time and space complexity analysis
- ๐ Key insights and takeaways
IMPORTANT: This repository follows a specific structure. Please adhere to it when contributing:
/LeetCode-Solutions
โโโ 1-two-sum/
โ โโโ README.md # Problem description and explanation
โ โโโ two-sum.py # Solution code
โโโ 2-add-two-numbers/
โ โโโ README.md # Problem description and explanation
โ โโโ add-two-numbers.cpp # Solution code
โโโ 15-3sum/
โ โโโ README.md # Problem description and explanation
โ โโโ 3sum.py # Solution code
โโโ README.md # This file
- Format:
{question-number}-{question-name}/ - Use lowercase with hyphens for question names
- Examples:
1-two-sum/,121-valid-palindrome/,200-number-of-islands/
-
README.md - Contains:
- Original problem statement
- Approach explanation
- Time/Space complexity analysis
- Example walkthrough
-
Solution file - Named as
{question-name}.pyor{question-name}.cpp- Clean, well-commented code
- Optimized solution preferred
This repository is participating in Hacktoberfest 2025! We welcome contributors of all skill levels to help grow this comprehensive collection of LeetCode solutions.
- โญ Star this repository before making any contributions
- ๐ด Fork this repository to your GitHub account
- ๐ Register for Hacktoberfest 2025 at hacktoberfest.com
# Clone your forked repository
git clone https://github.com/YOUR-USERNAME/leetcode-solution.git
cd leetcode-solution
# Create a new branch for your contribution
git checkout -b solution/problem-name- Create a folder following the naming convention:
{number}-{problem-name}/ - Add
README.mdwith problem description and your approach - Add solution file:
{problem-name}.pyor{problem-name}.cpp - Ensure your code is well-commented and follows best practices
# Add your changes
git add .
# Commit with a meaningful message
git commit -m "Add solution for Problem #123: Problem Name"
# Push to your fork
git push origin solution/problem-name- New LeetCode solutions not already present in the repository
- Optimized versions of existing solutions with better time/space complexity
- Solutions in different languages (Python, C++, Java, JavaScript)
- Improved documentation and problem explanations
- Bug fixes in existing solutions
- Duplicate solutions (check existing folders first!)
- Solutions without proper folder structure
- Code without comments or explanations
- Spam or low-effort contributions
- Solutions that don't work or haven't been tested
- Test Your Code: Ensure your solution passes on LeetCode before submitting
- Follow Structure: Adhere to the exact folder and file naming conventions
- Add Documentation: Include README.md with problem statement and approach
- Clean Code: Write readable, well-commented code
- One Problem Per PR: Submit separate pull requests for each problem
- Check for duplicates: Search existing folders to avoid duplicate submissions
- Read the problem: Understand the LeetCode problem thoroughly
- Test locally: Verify your solution works with the given examples
- Follow templates: Use the structure shown in existing solutions
When creating your PR, please include:
- Problem number and name
- Approach used (e.g., Two Pointers, Dynamic Programming)
- Time and Space complexity
- Any additional notes or optimizations
New to open source? Look for these types of contributions:
- Easy-level LeetCode problems
- Adding missing solutions in popular languages
- Improving documentation in existing solutions
- Adding complexity analysis to solutions
- PRs that don't follow the guidelines will be marked as
invalid - Spam PRs will be labeled as
spamand closed immediately - Quality over quantity - focus on meaningful contributions
All contributors will be acknowledged in our contributors section. Top contributors may be featured in repository highlights!
By participating in this project, you agree to maintain a respectful and inclusive environment. Be kind, helpful, and constructive in all interactions.
- ๐ Found a bug? Open an issue with details
- โ Have questions? Check existing issues or create a new one
- ๐ก Suggestions? We'd love to hear your ideas!
- ๐ข PR not approved? I tend to approve most PRs at night, in case your PR doesn't get approved timely tag me @Hsinha11 in the comments and I shall approve it, if it is fit :)
Happy Coding! Let's make this Hacktoberfest amazing together! ๐
Remember: The goal is to learn, contribute, and grow together as a community. Every contribution, no matter how small, makes a difference!