This structured six-month plan gradually introduces core DSA concepts and patterns, with 8-10 carefully selected practice questions each week. By the end of this plan, you’ll have covered foundational topics and advanced concepts needed for top-tier technical interviews.
- Topics: Two-pointer, Sliding Window, HashMap basics
- Patterns: Prefix Sum, Running Sum
- Practice:
- [Easy] Two Sum
- [Easy] Contains Duplicate
- [Easy] Maximum Subarray (Kadane’s Algorithm)
- [Medium] Best Time to Buy and Sell Stock
- [Medium] Product of Array Except Self
- [Medium] Subarray Sum Equals K
- [Medium] Longest Subarray with Sum K
- [Medium] Minimum Size Subarray Sum
- Topics: Sorting, Interval Overlap, Cyclic Sort
- Patterns: Sorting + Two-pointer, Merge Intervals
- Practice:
- [Easy] Sort Colors (Dutch National Flag Problem)
- [Medium] Merge Intervals
- [Medium] Set Matrix Zeroes
- [Medium] Next Permutation
- [Medium] Rotate Image
- [Medium] Find the Duplicate Number
- [Medium] Kth Largest Element in an Array
- [Medium] First Missing Positive
- Topics: HashMaps for Strings, Substrings
- Patterns: Sliding Window, Hashing
- Practice:
- [Easy] Longest Common Prefix
- [Easy] Valid Anagram
- [Medium] Longest Substring Without Repeating Characters
- [Medium] Minimum Window Substring
- [Medium] Find All Anagrams in a String
- [Medium] Group Anagrams
- [Medium] Longest Palindromic Substring
- [Medium] Decode Ways
- Topics: Substrings and Subsequence
- Patterns: Two-pointer, Dynamic Programming (DP) for Strings
- Practice:
- [Easy] Implement strStr()
- [Medium] Longest Common Subsequence
- [Medium] Edit Distance
- [Medium] Palindromic Substrings
- [Medium] Partition Labels
- [Hard] Minimum Window Substring
- [Hard] Substring with Concatenation of All Words
- [Hard] Wildcard Matching
- Topics: Singly and Doubly Linked Lists, Basic Operations
- Patterns: Two-pointer, Fast & Slow Pointers
- Practice:
- [Easy] Reverse Linked List
- [Easy] Middle of the Linked List
- [Medium] Linked List Cycle
- [Medium] Intersection of Two Linked Lists
- [Medium] Add Two Numbers
- [Medium] Remove N-th Node from End
- [Medium] Flatten a Multilevel Doubly Linked List
- [Hard] Merge K Sorted Lists
- Topics: Complex List Manipulations, Reversal in Groups
- Patterns: Fast & Slow Pointers, Recursive Linked List
- Practice:
- [Medium] Reverse Nodes in k-Group
- [Medium] Rotate List
- [Medium] Copy List with Random Pointer
- [Medium] Partition List
- [Medium] LRU Cache
- [Hard] LRU Cache
- [Hard] Reverse Nodes in k-Group
- [Hard] Insert into a Cyclic Sorted List
- Topics: Binary Tree Traversals (Inorder, Preorder, Postorder)
- Patterns: DFS and BFS Traversals
- Practice:
- [Easy] Binary Tree Inorder Traversal
- [Easy] Binary Tree Preorder Traversal
- [Easy] Binary Tree Postorder Traversal
- [Medium] Binary Tree Level Order Traversal
- [Medium] Binary Tree Zigzag Level Order Traversal
- [Medium] Binary Tree Right Side View
- [Medium] Binary Tree Left Side View
- [Medium] Binary Tree Maximum Path Sum
- Topics: Tree Properties, Recursive & Iterative Solutions
- Patterns: Depth-First Search, Breadth-First Search
- Practice:
- [Easy] Symmetric Tree
- [Medium] Lowest Common Ancestor of a Binary Tree
- [Medium] Binary Tree Level Order Traversal II
- [Medium] Serialize and Deserialize Binary Tree
- [Medium] Populating Next Right Pointers in Each Node
- [Hard] Recover Binary Search Tree
- [Hard] Flatten Binary Tree to Linked List
- [Hard] Binary Tree Cameras
- Topics: Graph Representations, BFS, DFS
- Patterns: Breadth-First Search, Depth-First Search
- Practice:
- [Easy] Flood Fill
- [Medium] Number of Islands
- [Medium] Surrounded Regions
- [Medium] Rotting Oranges
- [Medium] Word Ladder
- [Medium] Clone Graph
- [Medium] Course Schedule
- [Medium] Detect Cycle in Undirected Graph
- [Hard] Minimum Number of Swaps for Sorting
- Topics: Topological Sort, Connected Components
- Patterns: Topological Sort, Union-Find
- Practice:
- [Medium] Alien Dictionary
- [Medium] Course Schedule II
- [Medium] Reconstruct Itinerary
- [Medium] Connected Components in Graph
- [Medium] Accounts Merge
- [Hard] Find Critical and Pseudo-Critical Edges
- [Hard] Redundant Connection
- [Hard] Graph Valid Tree
- Topics: Basics of Recursion, Permutations, Combinations
- Patterns: Backtracking, DFS
- Practice:
- [Easy] Subsets
- [Medium] Combination Sum
- [Medium] Permutations
- [Medium] Palindrome Partitioning
- [Hard] N-Queens
- [Hard] Sudoku Solver
- [Hard] Word Search II
- [Hard] K-th Permutation Sequence
- Topics: Constraint Satisfaction, Optimizations
- Patterns: Recursion + Memoization
- Practice:
- [Medium] Generate Parentheses
- [Medium] Letter Combinations of a Phone Number
- [Medium] Partition to K Equal Sum Subsets
- [Hard] Restore IP Addresses
- [Hard] Expression Add Operators
- [Hard] Remove Invalid Parentheses
- [Hard] Count of Unique BSTs
- [Hard] Word Search
- Topics: Fundamentals of DP, 1D DP
- Patterns: Memoization, Tabulation
- Practice:
- [Easy] Climbing Stairs
- [Medium] House Robber
- [Medium] House Robber II
- [Medium] Decode Ways
- [Medium] Maximum Subarray
- [Medium] Jump Game
- [Medium] Longest Increasing Subsequence
- [Hard] Longest Substring with K Distinct Characters
- Topics: 0/1 Knapsack and Variants
- Patterns: Knapsack, Subset Sum
- Practice:
- [Medium] Partition Equal Subset Sum
- [Medium] Combination Sum IV
- [Medium] Coin Change
- [Medium] Target Sum
- [Medium] Ones and Zeroes
- [Medium] Minimum Subset Sum Difference
- [Hard] Word Break
- Topics: Longest Common Subsequence and Variants
- Patterns: Substring and Subsequence Problems
- Practice:
- [Medium] Longest Common Subsequence
- [Medium] Longest Common Substring
- [Medium] Minimum Insertions/Deletions
- [Medium] Edit Distance
- [Medium] Longest Palindromic Subsequence
- [Medium] Sequence Pattern Matching
- [Hard] Palindrome Partitioning II
- [Hard] Distinct Subsequences
- Topics: 2D DP, Grid Path Problems
- Patterns: Dynamic Programming on Grids
- Practice:
- [Easy] Unique Paths
- [Medium] Unique Paths II
- [Medium] Minimum Path Sum
- [Medium] Dungeon Game
- [Medium] Cherry Pickup
- [Hard] Interleaving String
- [Hard] Maximal Rectangle
- [Hard] Largest Rectangle in Histogram
- Topics: Interval Scheduling, Partitioning, Activity Selection
- Patterns: Interval Problems, Greedy Choice Property
- Practice:
- [Easy] Best Time to Buy and Sell Stock II
- [Medium] Jump Game
- [Medium] Jump Game II
- [Medium] Gas Station
- [Medium] N Meetings in One Room
- [Medium] Partition Labels
- [Medium] Task Scheduler
- [Hard] Minimum Number of Refueling Stops
- Topics: Heap Basics, Priority Queue, Top-K Problems
- Patterns: Min-Heap, Max-Heap
- Practice:
- [Easy] Kth Largest Element in a Stream
- [Medium] Kth Largest Element in an Array
- [Medium] Top K Frequent Elements
- [Medium] K Closest Points to Origin
- [Medium] Sort Characters By Frequency
- [Hard] Find Median from Data Stream
- [Hard] Merge K Sorted Lists
- [Hard] Sliding Window Maximum
- Topics: DP on Trees, Knapsack Variants
- Patterns: 0/1 Knapsack, DP with Trees
- Practice:
- [Medium] Partition Equal Subset Sum
- [Medium] Ones and Zeroes
- [Medium] Coin Change
- [Medium] Target Sum
- [Medium] Tree Diameter
- [Hard] Longest Increasing Path in a Matrix
- [Hard] Maximal Square
- [Hard] Burst Balloons
- Topics: Advanced Greedy Techniques, Miscellaneous
- Patterns: Greedy + Dynamic Programming, Hybrid Patterns
- Practice:
- [Medium] Minimum Number of Arrows to Burst Balloons
- [Medium] Reduce Array Size to The Half
- [Medium] Divide Array in Sets of K Consecutive Numbers
- [Hard] Minimum Cost to Hire K Workers
- [Hard] IPO
- [Hard] Maximum Profit in Job Scheduling
- [Hard] Candy
- Topics: Trie Basics, String Manipulations with Trie
- Patterns: Trie Structure, Prefix Matching
- Practice:
- [Easy] Implement Trie (Prefix Tree)
- [Medium] Add and Search Word - Data Structure Design
- [Medium] Word Search II
- [Medium] Replace Words
- [Medium] Design Search Autocomplete System
- [Hard] Palindrome Pairs
- [Hard] Concatenated Words
- [Hard] Maximum XOR of Two Numbers in an Array
- Topics: Range Queries, Lazy Propagation
- Patterns: Segment Tree, Fenwick Tree
- Practice:
- [Medium] Range Sum Query - Mutable
- [Medium] Range Sum Query 2D - Mutable
- [Medium] Count of Smaller Numbers After Self
- [Medium] Kth Largest Element in an Array
- [Hard] Reverse Pairs
- [Hard] The Skyline Problem
- [Hard] Maximum Sum of Rectangle No Larger Than K
- Topics: Comprehensive Review and Practice
- Practice:
- Review top 3-5 questions from Arrays and Strings sections
- Review top 3-5 questions from Linked Lists
- Practice Mock Interviews with a random mix of problems
- Focus on any weak areas or topics that need additional review
- Topics: Comprehensive Review and Practice
- Practice:
- Review top 3-5 questions from Trees and Graphs
- Review top 3-5 questions from Dynamic Programming
- Practice Mock Interviews with a random mix of problems
- Focus on polishing solutions for harder problems or any weak areas