DSA
✅ Practical Sequence for You (Simplified, Beginner-Friendly)
1. Arrays & Strings → 8–10 problems (reverse, rotate, subarray sum, hashing basics)
2. Recursion Basics → factorial, fibonacci, subsets, simple backtracking (5–6 problems)
3. Searching & Sorting → binary search variations, merge/quick sort (6–8 problems)
4. Linked List → insert, delete, reverse, cycle detection (6–7 problems)
5. Stack & Queue → implement using arrays/LL, balanced parentheses, min stack (6–8
problems)
6. Trees → basic traversals, height, diameter, lowest common ancestor (7–8 problems)
7. Heap & Hashing → priority queue problems, frequency problems (5–6 problems)
8. Graphs → BFS, DFS, shortest path basics (6–7 problems)
9. DP (intro) → Fibonacci, knapsack, LIS (5–6 problems)
📌 After this core round, THEN move to Striver’s problems gradually.
📖 Where your Book Fits
For each topic → read theory & 2–3 problems from Karumanchi.
Don’t try to finish all problems in the book right away.
Treat it as a second layer of practice after coding basics.
📝 Easy Problem Set (~65 Problems Total)
1. Arrays & Strings (10 Problems)
1. Reverse an array (GFG)
2. Find max & min element (GFG)
3. Kadane’s Algorithm (Maximum Subarray) – LeetCode 53
4. Two Sum – LeetCode 1
5. Move Zeroes – LeetCode 283
6. Best Time to Buy and Sell Stock – LeetCode 121
7. Rotate Array – LeetCode 189
8. Check if Array is Sorted and Rotated – LeetCode 1752
9. Longest Common Prefix (strings) – LeetCode 14
10. Valid Palindrome – LeetCode 125
2. Recursion (6 Problems)
1. Factorial of N (GFG)
2. Fibonacci using recursion (GFG)
3. Print all subsequences of array (GFG)
4. Subsets – LeetCode 78
5. Combination Sum – LeetCode 39
6. Rat in a Maze (GFG)
3. Searching & Sorting (7 Problems)
1. Binary Search (GFG)
2. First and Last Position in Sorted Array – LeetCode 34
3. Search in Rotated Sorted Array – LeetCode 33
4. Square Root (Binary Search) – LeetCode 69
5. Merge Sort implementation (GFG)
6. Quick Sort implementation (GFG)
7. Kth Largest Element – LeetCode 215
4. Linked List (7 Problems)
1. Reverse a Linked List – LeetCode 206
2. Middle of Linked List – LeetCode 876
3. Merge Two Sorted Lists – LeetCode 21
4. Detect Cycle in Linked List – LeetCode 141
5. Remove N-th Node from End – LeetCode 19
6. Add Two Numbers (Linked List) – LeetCode 2
7. Intersection of Two Linked Lists – LeetCode 160
5. Stack & Queue (7 Problems)
1. Implement Stack using Arrays/LL (GFG)
2. Implement Queue using Arrays/LL (GFG)
3. Valid Parentheses – LeetCode 20
4. Min Stack – LeetCode 155
5. Next Greater Element I – LeetCode 496
6. Implement Queue using Stacks – LeetCode 232
7. Implement Stack using Queues – LeetCode 225
6. Trees (8 Problems)
1. Maximum Depth of Binary Tree – LeetCode 104
2. Inorder Traversal – LeetCode 94
3. Preorder Traversal – LeetCode 144
4. Postorder Traversal – LeetCode 145
5. Symmetric Tree – LeetCode 101
6. Diameter of Binary Tree – LeetCode 543
7. Lowest Common Ancestor (BST) – LeetCode 235
8. Level Order Traversal – LeetCode 102
7. Heap & Hashing (6 Problems)
1. Kth Largest Element in Array – LeetCode 215
2. Top K Frequent Elements – LeetCode 347
3. Sort Characters by Frequency – LeetCode 451
4. Implement Min Heap / Max Heap (GFG)
5. Valid Anagram – LeetCode 242
6. Group Anagrams – LeetCode 49
8. Graphs (7 Problems)
1. BFS Traversal – GFG
2. DFS Traversal – GFG
3. Number of Islands – LeetCode 200
4. Flood Fill – LeetCode 733
5. Rotten Oranges – LeetCode 994
6. Detect Cycle in Undirected Graph – GFG
7. Clone Graph – LeetCode 133
9. Dynamic Programming (7 Problems)
1. Climbing Stairs – LeetCode 70
2. Fibonacci DP version – (GFG)
3. House Robber – LeetCode 198
4. Coin Change – LeetCode 322
5. Longest Increasing Subsequence – LeetCode 300
6. 0/1 Knapsack (GFG)
7. Unique Paths – LeetCode 62
📘 DSA in C++ Roadmap (3–4 Months, Topic-
wise)
Month 1 – Foundations
Week 1: Basics Refresher
Time & Space Complexity (Big O, Big Ω, Big Θ)
Recursion basics (direct, indirect, tail recursion)
C++ STL essentials → vector, pair, set, map, stack, queue
Week 2: Arrays
1D arrays: traversal, insertion, deletion
Prefix sums & subarray techniques (Kadane, sliding window intro)
2D arrays basics (matrix traversal, transpose, rotation)
Week 3: Strings
String operations (palindrome, substring, reverse, rotations)
Character frequency counting (hashing intro)
Pattern matching basics (naive, KMP optional later)
Week 4: Searching & Sorting
Linear Search, Binary Search & variations
Sorting algorithms: Bubble, Insertion, Selection (just basics)
Efficient sorts: Merge Sort, Quick Sort
Binary Search on answer (intro idea)
Month 2 – Linear Data Structures
Week 5: Linked List (Part 1)
Singly Linked List → create, insert, delete, traversal
Reverse a Linked List (iterative & recursive)
Middle of Linked List
Week 6: Linked List (Part 2)
Doubly Linked List
Circular Linked List
Applications of LL (LRU cache, polynomial representation)
Week 7: Stack
Stack using arrays & linked list
Applications:
Balanced parentheses
Next greater element
Infix → Postfix conversion & evaluation
Week 8: Queue
Queue using arrays & linked list
Circular Queue
Deque (double-ended queue)
Priority Queue (heap intro)
Month 3 – Non-Linear Data Structures
Week 9: Trees (Part 1)
Binary Tree basics (representation)
Tree traversals: Preorder, Inorder, Postorder
Level order traversal (BFS on tree)
Height, diameter, symmetry
Week 10: Trees (Part 2)
Binary Search Tree (BST) → insert, delete, search
Lowest Common Ancestor (BST & BT)
Applications of BST (sorted data)
Intro to AVL/Red-Black Trees (theory only)
Week 11: Heaps & Hashing
Heap (min-heap, max-heap) implementation
Heap operations: insert, delete, heapify
Heap sort
Hashing concepts:
Hash functions
Collisions & handling (chaining, open addressing)
Hashmaps in STL
Week 12: Graphs (Part 1)
Graph representations: adjacency list, adjacency matrix
BFS, DFS traversal
Applications of BFS/DFS: connected components, bipartite check
Cycle detection in graphs
Month 4 – Advanced + DP
Week 13: Graphs (Part 2)
Shortest path algorithms: Dijkstra, Bellman-Ford
Minimum Spanning Tree: Prim’s, Kruskal’s
Topological Sort
Disjoint Set Union (DSU/Union-Find)
Week 14: Dynamic Programming (Basics)
Recursion → Memoization → Tabulation
Fibonacci, Climbing Stairs
Knapsack (0/1 basic version)
Week 15: Dynamic Programming (Intermediate)
Longest Common Subsequence (LCS)
Longest Increasing Subsequence (LIS)
Coin Change
Subset Sum problems
Week 16: Wrap-up & Revision
Revise weak areas (LL, Trees, DP, Graphs)
Do 5–6 mixed problems from each major topic
Optional: Start selected Striver’s Sheet problems