This repository contains my solutions to various LeetCode problems implemented in C++. Each solution is organized in its own folder named after the problem's title or number, and it includes the C++ code, input/output examples, and any additional explanations.
1. Clone this repository to your local machine:
git clone https://github.com/your-username/leetcode-cpp-solutions.git
2. Navigate to the problem folder you're interested in:
cd leetcode-cpp-solutions/ProblemName
3. Open the .cpp file in your preferred C++ IDE or text editor to view the solution.
Problem contains questions related to Arrays, 2D Arrays, Matrix, Strings and other Data Structures and Algorithms in a folder along with their name, description and solution with approch explaination.
Contributions to this repository are welcome! If you have a better solution, improvement, or a new problem to add, follow these steps:
-
Fork this repository.
-
Create a new branch with a descriptive name:
git checkout -b feature/new-problem
-
Add your solution to the relevant problem folder.
-
Make sure your code is well-documented and includes explanations if needed.
-
Test your solution with different test cases to ensure correctness.
-
Commit your changes:
git commit -am 'Added solution for ProblemName'
- Push to your forked repository:
git push origin feature/new-problem
- Open a pull request describing the changes you've made.
LeetCode for providing a platform to practice coding skills.
@Ps1231 for creating and maintaining this repository.