LeetCode Solutions in Python 🐍

Welcome to my collection of LeetCode solutions! This repository contains my solutions to various LeetCode problems, written in Python. Whether you're here to find solutions, learn new coding techniques, or just explore different problem-solving strategies, I hope you find this repository helpful and inspiring.

Table of Contents 📚

About 📖

This repository is a collection of my solutions to LeetCode problems. Each solution is written in Python and is designed to be easy to understand. I've categorized the problems based on difficulty and topic, making it easy for you to find and study specific types of problems.

Directory Structure 🗂

The repository is organized as follows:

leetcode-solutions/

├── easy/
│   ├── problem_001.py
│   ├── problem_002.py
│   └── ...
│
├── medium/
│   ├── problem_101.py
│   ├── problem_102.py
│   └── ...
│
├── hard/
│   ├── problem_201.py
│   ├── problem_202.py
│   └── ...
│
└── README.md
  • easy/: Contains solutions to easy-level problems.
  • medium/: Contains solutions to medium-level problems.
  • hard/: Contains solutions to hard-level problems.

How to Use 🛠

  1. Clone the repository:

    git clone https://github.com/yourusername/leetcode-solutions.git
    cd leetcode-solutions
  2. Navigate to the problem directory:

    cd easy  # or medium, hard
  3. Run the solution:

    Each solution is a standalone Python script. You can run a solution using Python:

    python problem_001.py

    Make sure you have Python installed on your system. You can download it from python.org.

Contributing 🤝

Contributions are welcome! If you have a better solution or an optimization for any of the problems, feel free to submit a pull request. Please ensure your code follows the repository's style and includes comments explaining your approach.

  1. Fork the repository

  2. Create a new branch:

    git checkout -b feature/your-feature-name
  3. Make your changes and commit them:

    git commit -m 'Add some feature'
  4. Push to the branch:

    git push origin feature/your-feature-name
  5. Submit a pull request

Contact 📧

If you have any questions, suggestions, or just want to say hi, feel free to reach out to me:

Happy coding! 😊