This repo contains my solutions to various LeetCode problems implemented in C++.
- Comprehensive Solutions: Each solution is written in clean, modular C++ code.
- Optimized Implementations: Solutions are optimized for both time and space complexity where possible.
- Variety of Topics: Covers algorithms, data structures, dynamic programming, hashmaps and more.
The solutions are named after their corresponding problem:
For example:
twoSum.cpp
pivotIndex.cpp
- Install a C++ compiler (e.g., GCC or Clang).
- Use an IDE or text editor of your choice (e.g., Visual Studio Code, CLion).
- Clone this repository:
git clone https://github.com/manahiliqbal/Leetcode.git cd Leetcode
- Navigate to the problem file you want to run. For example:
g++ twoSum.cpp -o twoSum ./twoSum
Contributions are welcome! If you have an optimized solution or a different approach to a problem, feel free to:
- Fork the repository.
- Create a new branch.
- Commit your changes and open a pull request.
This project is licensed under the MIT License. Feel free to use the code for learning purposes.
If you have any questions or suggestions, feel free to contact me via email or open an issue in this repository.