LeetCode preparation is the primary barrier between Indian engineers and product company jobs. The common mistake is grinding random problems without structure: solving 300 problems without pattern recognition is less effective than solving 150 problems with deliberate topic coverage and spaced repetition. This guide gives you a structured 3-month plan to go from beginner to interview-ready at Indian product companies.
Month 1: Foundations (Arrays, Strings, Hashmaps, Two Pointers)
Week 1: Arrays and Hashmaps: Master the basics. Must-solve: Two Sum (easy), Best Time to Buy and Sell Stock (easy), Contains Duplicate (easy), Product of Array Except Self (medium), Maximum Subarray (medium: Kadane's Algorithm), Group Anagrams (medium).
Key patterns: HashMap for O(1) lookup. Prefix sums for range queries. Kadane's for maximum subarray.
Week 2: Two Pointers and Sliding Window: Must-solve: Valid Palindrome (easy), 3Sum (medium), Container With Most Water (medium), Longest Substring Without Repeating Characters (medium), Minimum Window Substring (hard: stretch goal).
Key patterns: Two pointers for sorted arrays and palindromes. Sliding window for substring/subarray problems with a constraint.
Week 3: Stacks and Queues: Must-solve: Valid Parentheses (easy), Daily Temperatures (medium), Evaluate Reverse Polish Notation (medium), Largest Rectangle in Histogram (hard: important), Min Stack (medium).
Key patterns: Monotonic stack for next greater/smaller element problems.
Week 4: Binary Search: Must-solve: Binary Search (easy), Search in Rotated Sorted Array (medium), Find Minimum in Rotated Sorted Array (medium), Koko Eating Bananas (medium), Median of Two Sorted Arrays (hard: stretch).
Key patterns: Binary search on the answer space (not just sorted arrays). Template: lo, hi, while lo <= hi, check mid.
Month 2: Trees, Graphs, and Dynamic Programming
Week 5: Binary Trees: Must-solve: Invert Binary Tree (easy), Maximum Depth of Binary Tree (easy), Lowest Common Ancestor (medium), Binary Tree Level Order Traversal (medium: BFS), Validate Binary Search Tree (medium), Serialize and Deserialize Binary Tree (hard).
Key patterns: Recursive tree problems follow the pattern: base case (null), recursive case (call left and right subtrees), combine results. BFS with a queue for level-order traversal.
Week 6: Graphs: Must-solve: Number of Islands (medium), Clone Graph (medium), Course Schedule (medium: cycle detection in directed graph), Pacific Atlantic Water Flow (medium), Rotting Oranges (medium: multi-source BFS).
Key patterns: BFS for shortest path (unweighted) and multi-source problems. DFS for connected components and cycle detection. Union-Find for disjoint set problems.
Week 7: Dynamic Programming 1D: Must-solve: Climbing Stairs (easy), House Robber (medium), Longest Palindromic Substring (medium), Jump Game (medium), Coin Change (medium: classic unbounded knapsack).
Key patterns: DP = overlapping subproblems + optimal substructure. Start with recursive with memoisation, then convert to tabulation. Identify: what is the state? what is the recurrence relation?
Week 8: Dynamic Programming 2D: Must-solve: Unique Paths (medium), Longest Common Subsequence (medium), Edit Distance (hard: important), 0/1 Knapsack (medium: classic), Partition Equal Subset Sum (medium).
Key patterns: 2D DP for problems involving two sequences or a grid. State: dp[i][j] represents something about the first i elements of sequence 1 and first j elements of sequence 2.
Month 3: Advanced topics and company-specific preparation
Week 9: Heaps and Priority Queues: Must-solve: Kth Largest Element in an Array (medium), Top K Frequent Elements (medium), Merge K Sorted Lists (hard), Find Median from Data Stream (hard), Task Scheduler (medium).
Key patterns: Min-heap for 'top K largest' problems. Max-heap for 'top K smallest'. Two-heap approach for dynamic median.
Week 10: Tries and Backtracking: Must-solve: Implement Trie (medium), Word Search II (hard: Trie + backtracking), Combination Sum (medium), Permutations (medium), Sudoku Solver (hard: stretch goal).
Key patterns: Trie for prefix-based string problems. Backtracking = DFS with explicit undo of choices.
Week 11: Company-specific problem sets: Sort your LeetCode session by company tag. For Flipkart: DP and graph problems are frequent. For Razorpay: hash maps and design questions. For Swiggy/Zomato: matrix/grid problems. For Amazon: sliding window and trees. Spend this week on 20 problems specifically tagged for your target company.
Week 12: Mock interviews and review: Do 2 full 75-minute mock interviews per day. Use NeetCode or AlgoExpert's structured problem sheets. Identify your weakest category and spend 30% of time revisiting it. Practise verbal explanation of your approach before coding: this is what real interviews evaluate.
Frequently asked questions
Practice these questions on HireStepX