Contains algorithmic concepts and programming problems I am learning and revising in C++.
Note: The implementations here are definitely not the cleanest (so no judgements). It's only to keep a record of things I am learning. May end up in an organized PDF with tests and optimizations some day.
Problems taken from Blind75, Elements of Programming Interviews (book) or Leetcode/Neetcode. I also plan to add protypes of interesting concepts I am learning.
https://cp-algorithms.com/index.html The Modern C++ Challenge by Marius Bancilla Advent of Code CppCon videos
https://www.quora.com/How-can-one-start-solving-dynamic-programming-problems
https://www.quora.com/What-is-divide-and-conquer-optimization-in-dynamic-programming
https://open.kattis.com/problems/islandalliances
https://open.kattis.com/problems/centsavings
https://leetcode.com/problems/kth-largest-element-in-an-array/description/ using quickselect
The repo contains solutions to 100+ problems, the most important problem list will be updated below:
Topic | Problem | Solution Link | Solution Approach |
---|---|---|---|
Graph | Implement Trie Prefix - Leetcode | Solution | Standard Trie implementation |
Graph | Course Schedule - Leetcode | Solution | Cycle Detection in a graph |
Graph | Course Schedule II - Leetcode | Solution | Topological Sort with DFS |
Graph | Number of Islands - Leetcode | Solution | DFS - Number of connected components |
Graph | Max area of Island - Leetcode | Solution | DFS - Number of connected components |
Graph | Pacific Atlantic Water Flow - Leetcode | Solution | DFS - Find reachable nodes |
Graphs | Design Add and Search Words Leetcode | Solution | Trie word search implementation |
Graphs | Surrounded Regions Leetcode | Solution | Find path to edges through DFS |
Arrays | Min Stack - Leetcode | Solution | Track min val in stack |
Linked Lists | Merge Sorted Lists Leetcode | Solution | Merge during traversal |
Two Pointers | Valid Palindrome Leetcode | Solution | Two pointer comparison |
Math | Power(x,y) Leetcode | Solution | recursively find the power |
Sliding Window | Minimum Window Substring Leetcode | Solution | Sliding Window keeping track of matches |