■■ LoopWar DSA Roadmap (Topics + Subtopics in
Learning Order)
Arrays
• Basics of Arrays & Memory Layout
• Traversal & Basic Operations (Insert/Delete/Update)
• Prefix Sum & Difference Array
• Subarrays & Subsequence Basics
• Kadane’s Algorithm (Max Subarray Sum)
• Two Pointers Technique
• Sliding Window Technique
• Matrix Basics (2D Arrays)
• Spiral Traversal & Diagonal Traversal
• Rotate & Transpose Matrix
Strings
• String Basics & Character Arrays
• Palindrome Checking
• Anagram Checking
• Substrings & Subsequences
• String Matching Algorithms (Naive, KMP, Rabin-Karp, Z Algo)
• Longest Common Prefix
• Pattern Matching Problems
• String Compression & Encoding
• Minimum Window Substring Problems
Hashing & Maps
• Basics of Hash Table
• Hash Map Operations (Insert, Delete, Search)
• Hash Set Operations
• Frequency Counting Problems
• Prefix Sum with Hashing
• Subarray Sum Problems with Hashing
• Anagrams Using Hash Maps
• Caching Basics (LRU Cache via HashMap + LinkedList)
Sorting & Searching
• Basic Sorting: Bubble, Selection, Insertion
• Merge Sort
• Quick Sort
• Heap Sort
• Counting Sort / Radix Sort / Bucket Sort
• Binary Search Basics
• Binary Search on Answer
• Search in Rotated Array
• Median & K-th Element Problems
• Ternary Search
Linked List
• Singly Linked List Basics
• Insert/Delete/Traversal in Linked List
• Reversing a Linked List (Iterative + Recursive)
• Detecting Cycles (Floyd’s Algorithm)
• Merge Two Sorted Linked Lists
• Intersection of Linked Lists
• Doubly Linked List
• Circular Linked List
• Flatten Linked List Problems
Stack & Queue
• Stack Basics & Operations
• Balanced Parentheses Problem
• Infix, Prefix, Postfix Conversion
• Monotonic Stack Problems (Next Greater/Smaller Element)
• Queue Basics & Operations
• Deque & Circular Queue
• Monotonic Queue Problems
• Sliding Window Maximum using Deque
• LRU Cache using Queue + Hash Map
Recursion & Backtracking
• Basics of Recursion (Factorial, Fibonacci)
• Tail vs Head Recursion
• Subset Generation (Power Set)
• String/Array Permutations
• Combinations & Combinatorial Generation
• N-Queens Problem
• Rat in a Maze Problem
• Word Search Problem
• Sudoku Solver
• Backtracking Template Problems
Trees
• Binary Tree Basics & Representation
• Traversals (Preorder, Inorder, Postorder, Level Order)
• Height & Diameter of a Tree
• Symmetric & Balanced Trees
• Lowest Common Ancestor (LCA)
• Path Sum Problems
• Serialize & Deserialize a Tree
• Binary Search Tree (BST) Basics
• BST Operations (Insert, Delete, Search)
• Self-Balancing Trees (Intro to AVL, Red-Black Trees)
Heaps & Priority Queue
• Basics of Heap (Min Heap, Max Heap)
• Heapify Operation
• Heap Sort
• Priority Queue Implementation
• Top-K Problems
• Median of Data Stream
• Merge K Sorted Arrays
• Merge K Sorted Linked Lists
Graphs
• Basics of Graph Representation (Adjacency List, Matrix)
• BFS (Breadth-First Search)
• DFS (Depth-First Search)
• Connected Components
• Cycle Detection (Undirected & Directed)
• Bipartite Graph Check
• Topological Sort (DFS + Kahn’s Algorithm)
• Shortest Path (Dijkstra’s Algorithm)
• Bellman-Ford Algorithm
• Floyd-Warshall Algorithm
• Minimum Spanning Tree (Prim’s & Kruskal’s Algorithm)
• Union-Find / Disjoint Set Union (DSU)
• Bridges & Articulation Points (Tarjan’s Algorithm)
• Strongly Connected Components (Kosaraju’s Algorithm)
Greedy Algorithms
• Basics of Greedy Approach
• Activity Selection Problem
• Interval Scheduling Problems
• Minimum Platforms Problem
• Job Sequencing Problem
• Fractional Knapsack Problem
• Huffman Coding
• Greedy Graph Problems (Minimum Spanning Tree via Greedy)
Dynamic Programming (DP)
• Introduction to DP (Memoization vs Tabulation)
• Fibonacci with DP
• Climbing Stairs Problem
• House Robber Problem
• Subset Sum Problem
• Knapsack Variants (0/1 Knapsack, Unbounded Knapsack)
• Longest Common Subsequence (LCS)
• Longest Increasing Subsequence (LIS)
• Edit Distance Problem
• Matrix Chain Multiplication
• DP on Subsets (Bitmask DP Basics)
• DP on Strings (Palindrome Partitioning, Subsequence Matching)
• DP on Trees (Diameter, Max Path Sum)
• DP on Graphs (Shortest Path with DP)
Bit Manipulation
• Basics of Bits (AND, OR, XOR, NOT)
• Check/Set/Unset a Bit
• Count Set Bits
• XOR Properties
• Single Number Problems (Unique Element)
• Power of Two Checks
• Subsets Using Bits
• Fast Exponentiation with Bits
• Bitmask DP
Math & Number Theory
• Basics of GCD & LCM (Euclidean Algorithm)
• Prime Numbers & Sieve of Eratosthenes
• Prime Factorization
• Modular Arithmetic
• Modular Exponentiation (Binary Exponentiation)
• Inverse Modulo
• Combinatorics Basics (nCr, Pascal’s Triangle)
• Probability Problems
• Pigeonhole Principle Problems
Trie (Prefix Tree)
• Basics of Trie Data Structure
• Insert & Search in Trie
• Longest Prefix Matching
• Autocomplete Problems
• Word Dictionary Problems
• Advanced Trie Problems (Bitwise Trie for XOR)
Advanced Data Structures
• Segment Tree Basics
• Range Minimum Query with Segment Tree
• Lazy Propagation in Segment Tree
• Fenwick Tree (Binary Indexed Tree)
• Sparse Table for Range Queries
• Disjoint Set Union (Union by Rank + Path Compression)
• Persistent Data Structures (Intro)