This guide provides solutions to the top 100 LeetCode problems, all written in C++.
Each problem is organized by category and saved as a header file with a numerical name for easy tracking on LeetCode. To test your solution, simply include the corresponding header file in your source code(ahead of main function). You can also extend the code by writing your own .cpp files to test each .h file.
The number 0 is not used on LeetCode, so I have repurposed it to include common header files such as ‘vector’, ‘string’, and ‘iostream’. This way, when you add a new problem, you can just include the common header file to avoid repetitive inclusion.
You may find there are more than 1 solution in some problems.
I have provided minimal comments(maybe 0 comment :) for the solutions. However, I will make an effort to explain each solution in detail in the README file.