Welcome to the LeetCodeSolutions repository! If you're like me, you've probably found yourself stuck on a problem on LeetCode and wished you had a resource to turn to for help. Well, that's exactly what this repository is for! Here, you will find solutions to various problems on LeetCode, along with explanations of the thought process behind each solution.
LeetCode is a popular platform for preparing for coding interviews and improving your coding skills. However, sometimes it can be helpful to see multiple solutions to a problem, or to have a resource to refer to when you get stuck. This repository aims to provide a collection of solutions to LeetCode problems that can be used for these purposes.
You can browse through the solutions in this repository by going to the Solutions directory and looking for the problem you are interested in. Each solution will have its own directory with a README.md file that explains the solution in more detail.
If you would like to contribute to this repository, here are the steps you can follow:
-
Fork this repository by clicking the "Fork" button in the top right corner of this page. This will create a copy of the repository in your own GitHub account.
-
Clone the repository to your local machine by running the following command:
git clone https://github.com/mibrahim2001/LeetCodeSolutions.git
-
Create a new branch for the problem you want to add a solution for by running the following command:
git checkout -b <problem-name>
(replace with the name of the problem you are adding a solution for, the naming convention is like this "problem_number_problem_name"). If you want to add a new solution for a problem which donot exist already you can create a new directory for that problem and add your solution in that directory and if the problem already exist you can add your solution in the existing directory.
-
Commit your changes and push them to your fork of the repository:
git add .
git commit -m "Add solution for <problem-name>"
git push origin <problem-name>
(replace with the name of the problem you are adding a solution for)
-
Create a pull request by going to your fork of the repository and clicking the "New pull request" button. This will create a pull request that will allow me to review your changes and merge them into the main repository.
-
Wait for your pull request to be reviewed and merged.
There are several benefits to contributing to this repository:
- You'll be helping out other LeetCode users who are stuck on the same problem you solved. There's no better feeling than being able to help someone else out!
- You'll get the chance to practice explaining your thought process, which is a valuable skill to have as a programmer.
- You'll receive feedback on your solution from other contributors, which can help you become a better coder.
- You'll have another item to add to your portfolio, showing potential employers that you're actively working to improve your skills.
- You'll be thankful to yourself if you contribute on daily basis because you will improve your skill for sure but in addition to that your github profile will look amazing thanks to these daily contributions.
Thank you for considering contributing to this repository!