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}.py
or{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.md
with problem description and your approach - Add solution file:
{problem-name}.py
or{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
spam
and 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!
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!