In this repo I want to share with you my solutions to some Leetcode problems written in C++ to practice my Algorithms and Data Structure skills. I will update this list periodically as I do more problems. I hope it will be helpful to some of you if you get stuck on a specific problem. Feel free to contact me if you have any questions.
I have accumulated a list of most commonly used algorithms to serve as a reference and a base for solving problems.
- MST from edge priority queue: Reference implementation
- MST from edge vector: Reference implementation, edges need to be sorted ascending by len
- Matrix BFS/Flood fill Iterative: Reference implementation
- Matrix BFS/Flood fill Recursive: Reference implementation
- Union Find: Fast implementation, all optimization tricks used
- Segment Tree Iterative: Fast implementation, contains tricky bits
- Segment Tree Recursive: Reference implementation, easy to understand
- Dynamic Segment Tree Recursive: Reference implementation, checks range coverage