Welcome to my LeetCode solutions repository! This collection contains my solutions to various LeetCode problems, organized by question name.
LeetCode is a platform for preparing technical coding interviews. In this repository, you will find my solutions to LeetCode problems along with explanations, time and space complexity analysis, and any other relevant information.
- Each problem has its own directory.
- The directory name corresponds to the question name on LeetCode.
- Inside each directory, you'll find the README file explaining the solution and a code file containing the solution code.
- I encourage each of you to read each section of the solution one by one, try to understand it, and then solve it on your own.
- If you still cannot, move to the next section.
- Finally, try to check the code comments and understand it.
- I wouldn't encourage copy-pasting the solution. This is not for spoon-feeding solutions but rather to build an environment where everyone can learn.
Feel free to contribute by adding more solutions, optimizing existing ones, or providing better explanations. Follow these steps to contribute:
- Fork the repository.
- Create a new branch for your feature:
git checkout -b problem-name
. - Commit your changes:
git commit -m 'explain the changes/enhancements'
. - Push to the branch:
git push origin problem-name
. - Create a pull request.
- Explain why your solution is better.
- Share LeetCode screenshots.
- Submit a pull request.
- Trivial questions and bruteforce solutions not allowed.
Happy Coding!