This repository contains my Python solutions to various LeetCode problems, organized by difficulty: Easy, Medium, and Hard.
Each solution includes:
- ✅ Clean & Readable Python Code
- ✅ Explanation of Approach (where applicable)
- ✅ Complexity Analysis (Time & Space)
- 🧩 Categorized by difficulty (Easy / Medium / Hard)
- 📂 Organized by LeetCode problem number & title
- 📝 Explanations & comments in code
- 🚀 Continuously updated with new solutions
LeetCode-Solutions/
│
├── easy/
│ ├── 0001_Two_Sum.py
│ ├── 0053_Maximum_Subarray.py
│ └── ...
│
├── medium/
│ ├── 0015_3Sum.py
│ ├── 0198_House_Robber.py
│ └── ...
│
├── hard/
│ ├── 0042_Trapping_Rain_Water.py
│ └── ...
│
└── README.mdgit clone https://github.com/sdivyanshu90/LeetCode-Solutions.git
cd LeetCode-SolutionsTo test a specific solution:
python easy/0001_Two_Sum.pyContributions are welcome! 🚀 If you’d like to add solutions, improve explanations, or reorganize content:
- Fork the repo
- Create a new branch (
feature/new-solution) - Commit your changes
- Open a Pull Request
This project is licensed under the MIT License – see the LICENSE file for details.
- Thanks to LeetCode for the amazing problem sets.
- Inspired by the coding community & open-source contributors.