Welcome to my repository of LeetCode problems solved in C++. This repository contains my personal solutions to various algorithmic challenges and problems from LeetCode.
This repository serves as a collection of my solutions to problems from LeetCode, a popular platform for coding interviews and competitive programming. Each solution is implemented in C++ and is organized by the problem's name or ID for easy navigation.
The repository is organized as follows:
leetcode-solutions/
├── README.md
├── arrays/
│ ├── two_sum.cpp
│ └── ...
├── linked_lists/
│ ├── reverse_linked_list.cpp
│ └── ...
├── trees/
│ ├── binary_tree_inorder_traversal.cpp
│ └── ...
├── dynamic_programming/
│ ├── longest_increasing_subsequence.cpp
│ └── ...
└── ... (other categories as needed)
- Each directory contains solutions related to a specific topic or data structure.
- Each file is named according to the problem it solves, with a brief description in the comments.
To use or test any of the solutions:
-
Clone the repository:
git clone https://github.com/ilorde-exe/leetcode.git cd leetcode -
Navigate to the directory of interest:
cd arrays -
Compile and run the C++ file:
g++ two_sum.cpp -o two_sum ./two_sum
Feel free to modify the code or use it as a reference for your own solutions.
Contributions are welcome! If you have a better solution or an alternative approach to any of the problems, please submit a pull request. Make sure your code follows the existing structure and includes comments explaining your solution.
To contribute:
- Fork the repository.
- Create a new branch for your feature or bugfix:
git checkout -b feature-new-solution
- Commit your changes:
git commit -am 'Add new solution for XYZ problem' - Push to the branch:
git push origin feature-new-solution
- Create a new pull request on GitHub.
This repository is licensed under the GNU License. See the LICENSE file for more information.
Happy coding!