DSA Interview Prep: 100 Must-Solve Problems
Curated list of 100 problems that cover 90% of coding interviews — with patterns, approaches & time targets
Arrays & Strings (25 problems)
Pattern: Two Pointers — Used in: Container with most water, 3Sum, Remove duplicates. Time target: 15-20 min each.
Pattern: Sliding Window — Used in: Maximum subarray, Longest substring without repeating chars. Key: expand right, shrink left.
Pattern: Prefix Sum — Used in: Subarray sum equals K, Range sum query. Pre-compute cumulative sums for O(1) range queries.
Must-solve: Two Sum, Best Time to Buy/Sell Stock, Product of Array Except Self, Merge Intervals, Group Anagrams.
Solve these 5 on LeetCode today: Two Sum, Valid Anagram, Maximum Subarray, Merge Intervals, 3Sum. Time yourself.
Trees & Graphs (25 problems)
Binary Trees: Traversals (inorder, preorder, postorder), Max depth, Validate BST, Lowest Common Ancestor.
Graphs: BFS for shortest path, DFS for connectivity, Topological sort for dependencies, Dijkstra for weighted shortest path.
Pattern: Level-order traversal using queue. Pattern: Recursive DFS with base case + recursive case.
Must-solve: Invert Binary Tree, Same Tree, Number of Islands, Course Schedule, Word Ladder.
Dynamic Programming (25 problems)
DP = Recursion + Memoization. If a problem has overlapping subproblems and optimal substructure → use DP.
Pattern: 1D DP — Climbing stairs, House robber, Coin change. Start with recursive solution, then add memo table.
Pattern: 2D DP — Longest common subsequence, Edit distance, Unique paths. Build a 2D table, fill row by row.
Must-solve: Climbing Stairs, Coin Change, Longest Increasing Subsequence, 0/1 Knapsack, Edit Distance.
System Design Basics (for SDE-2+)
Framework: Requirements → Estimation → API Design → Database Schema → High-Level Architecture → Deep Dive → Bottlenecks.
Must-know concepts: Load balancing, Caching (Redis), Database sharding, Message queues (Kafka), CDN, Microservices.
Common questions: Design URL shortener, Design Twitter feed, Design WhatsApp, Design parking lot (LLD).
Resources: "System Design Interview" by Alex Xu, Gaurav Sen YouTube, ByteByteGo newsletter.
Unlock Full Guide
3 more sections with exercises, tips & next steps
Login to Read Full Guide Demo: admin / admin123