This repository contains 200+ solved problems from LeetCode and GeeksforGeeks, written in C++ and organized topic-wise for easy revision and interview preparation.
| Topic | Description |
|---|---|
array |
All essential array-based problems including subarrays, Kadane’s, prefix/XOR |
binary search |
Classic + tricky problems like rotated array, 2D matrix, BS on answers |
binary trees |
Traversals, height, views, LCA, BST logic |
linked_list |
Reversal, addition, merge, loops, K-group reverse |
graphs |
BFS/DFS, Union-Find, shortest paths, grid-based traversal |
dynamic_programming |
All major patterns – LIS, LCS, DP on Grid, Knapsack, Stocks |
greedy algorithms |
Interval scheduling, candy, jump game, knapsack, platforms |
strings |
Anagrams, palindrome, character maps, Roman conversions |
stacks |
Monotonic stacks, valid parentheses, histogram, LRU |
Sliding Window + 2 Pointers |
Substring problems, max/min subarrays, character window problems |
sorting |
Sorting logic & quick sort |
recursion |
Backtracking & recursion starter problems |
HashingBasics.cpp |
Basic hashing tricks for array & char maps |
stl.cpp |
C++ STL cheat sheet with examples for quick revision |