Skip to content

This repository contains my solutions to various coding problems from LeetCode, a platform for practicing coding interviews. The solutions are organized by problem number and include explanations and comments where applicable. By sharing my solutions publicly, I aim to contribute to the learning and collaboration within the programming community.

Notifications You must be signed in to change notification settings

satendra03/LeetCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode Solutions Repository 🚀

Welcome to my LeetCode Solutions repository! This repository contains my solutions to various coding problems from LeetCode, a platform for practicing coding interviews. By sharing my solutions publicly, I aim to contribute to the learning and collaboration within the programming community.

Table of Contents 📑

Introduction 📘

LeetCode is an excellent resource for sharpening your coding skills and preparing for technical interviews. This repository is organized by problem number and name, and each solution includes explanations and comments where applicable. My goal is to provide clear and concise solutions to help others understand different approaches to solving these problems.

Directory Structure 📂

The repository is structured as follows:

  • Each problem is stored in a directory named with the problem number and title.
  • Each problem directory contains:
    • The solution file (e.g., solution.cpp)
    • A README.md file with a detailed explanation of the problem and the solution

Solution Format 📝

Each solution is provided in a separate file and follows this format:

  • Filename: solution.cpp
  • Docstring: A brief description of the problem
  • Code: The C++ code solving the problem
  • Comments: Inline comments explaining key parts of the solution

Additionally, each problem directory includes a README.md file with:

  • A restatement of the problem
  • Explanation of the approach and logic used in the solution
  • Time and space complexity analysis

How to Use 🔧

  1. Clone the repository:

    git clone https://github.com/satendra03/LeetCode.git
    cd LeetCode
  2. Navigate to the solution of interest:

    cd solutions/0001 - Two Sum
  3. Compile and run the solution:

    Each solution can be compiled and run using a C++ compiler. For example:

    g++ solution.cpp -o solution
    ./solution

Contributing 🤝

Contributions are welcome! If you have a better solution or additional problems to add, please follow these steps:

  1. Fork the repository
  2. Create a new branch (git checkout -b feature-branch)
  3. Commit your changes (git commit -am 'Add new solution or improve existing one')
  4. Push to the branch (git push origin feature-branch)
  5. Create a new Pull Request

Contact 📬

If you have any questions, suggestions, or feedback, feel free to reach out to me:

Happy coding! 😊

About

This repository contains my solutions to various coding problems from LeetCode, a platform for practicing coding interviews. The solutions are organized by problem number and include explanations and comments where applicable. By sharing my solutions publicly, I aim to contribute to the learning and collaboration within the programming community.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published