This repository contains my solutions to various LeetCode problems. The solutions are organized by difficulty level, with each problem stored in its respective folder. Each problem folder includes the problem statement and the solution code.
The repository is structured into three main folders based on the difficulty of the problems:
- Easy: Contains solutions to problems marked as easy.
- Medium: Contains solutions to problems marked as medium.
- Hard: Contains solutions to problems marked as hard.
Each problem folder within these directories is named after the problem title and contains the following files:
- README.md: Contains the problem statement.
- solution.py: Contains the Python implementation of the solution.
- Python 3.x
-
Clone the repository:
git clone https://github.com/yourusername/leetcode-solutions.git cd leetcode
-
Ensure you have Python installed. You can check your Python version with:
python --version
To run any solution, navigate to the respective problem folder and execute the Python script. For example:
cd Easy
python filename.py
- Fork the repository.
- Create your feature branch (
git checkout -b feature/your-feature
). - Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature/your-feature
). - Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
- LeetCode for providing the platform and problem statements.
- The open-source community for continuous support and contributions.
Happy coding!