DSA Roadmap: From Basics to Advanced
STEP 1: Foundational Data Structures (DS)
- Arrays: Insert, delete, search, traverse, multi-dimensional
- Strings: String operations, pattern matching basics
- Linked Lists: Singly, Doubly, Circular; reverse, cycle detection
- Stacks: LIFO; using array/linked list; used in backtracking, parsing
- Queues: FIFO; Circular Queue, Deque, Priority Queue
- Trees: Binary Tree, Binary Search Tree, traversals
- Heaps: Min/Max heap, used in sorting and PQs
- Graphs: Adjacency list/matrix, weighted/unweighted, directed/undirected
- Hashing: Hash tables/maps, sets, collision resolution techniques
STEP 2: Topic-Wise Algorithms (10+ each)
Searching:
- Linear, Binary, Ternary, Jump, Exponential, Interpolation, Fibonacci, Rotated Array, Upper/Lower Bound,
Binary Search on Answer
Sorting:
- Bubble, Selection, Insertion, Merge, Quick, Heap, Counting, Radix, Bucket, Shell, TimSort, Topological Sort
Recursion/Backtracking:
- Factorial, Fibonacci, N-Queens, Sudoku, Subset Sum, Maze, Word Break, Permutations, Combinations,
Knights Tour
Greedy:
- Activity Selection, Knapsack, Huffman Coding, Job Sequencing, Coin Change, Dijkstra, Kruskal, Prim,
Coloring, Interval Scheduling
Mathematics:
- GCD, LCM, Sieve, Modular Arithmetic, Fast Exponentiation, Fermat's, Matrix Expo, Mod Inverse, Prime
DSA Roadmap: From Basics to Advanced
Factorization
Dynamic Programming:
- Fibonacci, Knapsack (0/1, Unbounded), LCS, LIS, MCM, Edit Distance, Coin Change, Partition Sum,
Palindrome Cuts
Graphs:
- BFS, DFS, Dijkstra, Bellman-Ford, Floyd-Warshall, Topo Sort, Union-Find, Kruskal, Prim, Kosaraju, Tarjan,
Cycle Detection
STEP 3: Other Core Concepts
- Time/Space Complexity: Big O, Master Theorem
- Bit Manipulation: Set/unset bits, power of 2, XOR tricks
- Sliding Window: Max/min subarrays, distinct elements in window
- Two Pointers: Target sum, duplicates, merge sorted arrays
- Prefix Sums / Difference Arrays: Range queries, updates
- Union-Find: Disjoint Sets, cycle detection
Learning Strategy
1. Learn the data structure and implement from scratch.
2. Learn algorithms using the DS.
3. Solve topic-wise problems (1020 each).
4. Use platforms: Leetcode, GFG, Codeforces, InterviewBit.