This repository contains my solutions to the daily LeetCode problems. Each solution is implemented in C++. The purpose of this repository is to track my progress, improve my problem-solving skills, and share my solutions with others.
Check out my LeetCode Profile to see more of my coding solutions and progress!
- Each folder is named after the problem and contains:
solution.cpp
: The C++ code for the problem.README.md
: A detailed explanation of the solution.
-
Clone the repository:
git clone https://github.com/https-sharif/LeetCode-Solution.git
-
Navigate to the problem folder:
cd LeetCode-Solution/(problem-name) # Replace 'problem-name' with the actual problem name
-
Compile and run the solution:
-
Using
g++
(GCC):g++ solution.cpp -o solution ./solution
-
Using
clang++
(Clang) orXcode
(macOS):clang++ solution.cpp -o solution ./solution
-
Using
MSVC
(Microsoft Visual Studio Compiler on Windows):cl solution.cpp solution.exe
-
Contributions are welcome! Feel free to fork this repository and submit pull requests if you have any improvements or alternative solutions.
I would be especially glad if you could provide implementations of the solutions in other programming languages, such as Python, Java, or JavaScript. Your name will be credited for your contributions and will help make this repository more versatile and useful for a wider audience!
If you're up for contributing or have any questions, don't hesitate to reach out to me!
This project is licensed under the MIT License - see the LICENSE file for details.