Coding interviews are the primary filter at FAANG India, Razorpay, CRED, Swiggy, Flipkart, and virtually every well-paying tech company in India. This guide covers the complete DSA roadmap, LeetCode preparation strategy, and competitive programming approach for Indian engineering candidates in 2026.
DSA topic priority roadmap for Indian tech interviews
DSA roadmap ordered by interview frequency:
1. Arrays and strings (highest frequency; every interview has at least one) - Two pointers: pair sum, reverse, remove duplicates, sliding window variant - Sliding window: maximum/minimum subarray of size k, longest substring without repeating characters - Prefix sums: range sum queries, subarray sum equals k (use a hashmap of prefix sum frequencies) - Kadane's algorithm: maximum subarray sum (dynamic programming compressed to O(1) space)
- Hashing: frequency maps, two-sum pattern, anagram grouping, first unique character
3. Trees (binary trees + BST): - Traversals: BFS (level-order), DFS (inorder, preorder, postorder) iteratively and recursively - Key problems: LCA, diameter, path sum, max depth, right side view, zigzag level order - BST: insert, delete, validate, kth smallest, convert sorted array to BST - Serialise and deserialise binary tree (asked at Google, Amazon)
- Binary search: on sorted arrays AND on the answer (minimise the maximum, maximise the minimum; requires recognising that the answer space is monotonic)
- Graphs: BFS for unweighted shortest path; DFS for connected components, cycle detection (both directed and undirected); Dijkstra for weighted shortest path; topological sort for dependency ordering; union-find for dynamic connectivity; number of islands pattern
6. Dynamic programming (SDE-2+ and FAANG-tier): - 1D DP: climbing stairs, coin change, house robber, jump game - 2D DP: unique paths, edit distance, longest common subsequence, 0/1 knapsack - Interval DP: burst balloons, strange printer
- Heaps: top-K elements, merge K sorted lists, median from a data stream, task scheduler
- Stacks: next greater element, valid parentheses, largest rectangle in histogram (monotonic stack), min stack
- Linked lists: reverse, detect cycle (Floyd's), merge sorted lists, find middle (slow/fast pointer)
- Tries: autocomplete, word search, prefix count
LeetCode preparation strategy
LeetCode preparation phases:
Phase 1 (weeks 1-4): Foundation
- Complete the LeetCode 75 or Blind 75 list (75 high-quality problems covering all major patterns)
- Budget 25-30 minutes per problem before looking at the solution
- After solving: read the top 2-3 voted solutions to learn alternative approaches
- Write actual code (not pseudocode); test with edge cases yourself
Phase 2 (weeks 5-8): Pattern mastery
- Group problems by pattern; solve 5-10 per pattern in a single sitting (all sliding window problems together, all Dijkstra problems together)
- After each batch, write a 'pattern card': when to recognise this pattern, the template code, and 3 example problems
- Common patterns to master: two pointers, sliding window, BFS/DFS template, monotonic stack, union-find, Dijkstra, and DP state definition
Phase 3 (weeks 9-12): Company-specific + mock interviews
- Use LeetCode's company filter (top 25 problems for your target company in the last 6 months)
- FAANG India (Google, Amazon, Microsoft, Meta): emphasise hard-difficulty DP, graph, and string problems
- Razorpay, CRED, Swiggy: medium difficulty is sufficient; pair with system design preparation
- Practice timed: set a 35-minute timer per problem (45-minute interview slot minus time for discussing approach and Q&A)
Problem volume targets:
- After Phase 1: 75 problems
- Target for strong performance: 200-250 problems completed with understanding (not just accepted)
- Phase 2 adds 75-100; Phase 3 adds 50-75 company-specific problems
Most impactful habit: solve 1-2 problems every day consistently (6 days per week) rather than cramming 20 problems on the weekend. Spacing improves retention.
Competitive programming vs LeetCode: which to prioritise
LeetCode vs Codeforces for Indian interview prep:
The difference: LeetCode: optimised for software engineering interviews. Problems map directly to interview questions; editorial discussions explain the pattern; any language supported; tags and company filters. Codeforces/CodeChef: optimised for algorithmic contests. Problems are harder and more mathematical; rated system (Specialist, Expert, Candidate Master, etc.); time-pressured competitions.
Which to prioritise: For interview prep as the primary goal: LeetCode is more efficient. The interview question bank at Indian product companies and FAANG India overlaps heavily with LeetCode medium-hard, not Codeforces Div 1 D/E problems.
Why competitive programming still helps:
- Speed: contest practice trains you to code faster under pressure; a 45-minute interview leaves little margin for slow implementation.
- Volume: Codeforces Div 2 A/B problems provide high-volume fluency in arrays, greedy, and basic graph problems.
- Rating as a resume signal: Codeforces Expert (1600+) or Specialist (1400-1599) is a meaningful signal that companies like Google India, Jane Street, and trading firms explicitly look for. An Expert rating typically means LeetCode coding rounds feel easy.
Recommended approach:
- Start with LeetCode for the first 4-6 weeks (build patterns)
- Add 2 Codeforces Div 2 contests per week after that (build speed and range)
- If targeting trading firms or Google India specifically, push Codeforces rating to Expert (1600+) as an explicit goal
Contests help even if you do not reach a high rating: attempting Div 2 A+B in the first 30 minutes simulates real interview time pressure better than self-paced LeetCode.
Practise explaining your DSA and coding approach with HireStepX's AI voice interviewer. Get scored feedback on clarity, pattern recognition, and solution quality. First 2 sessions free.
Practice freeInterview coding round tips
Coding interview execution tips:
1. Always ask clarifying questions before writing code: - What are the input constraints? (Array length? Value range? Negative numbers?) - What should I return for an empty input? - Is the array sorted? Can there be duplicates? Asking 2-3 focused questions signals problem-solving maturity and prevents wasting time on the wrong approach.
2. Talk through your approach before coding: Explain the pattern you recognise ('This looks like a sliding window problem because we need the longest subarray with a constraint'). Describe the time and space complexity of your approach. Ask if the interviewer is happy with the approach before implementing. This is worth 20-30% of the interview score at most companies.
3. Code cleanly even under time pressure: - Descriptive variable names (left, right, maxLen vs i, j, x) - No magic numbers; use named variables ('const WINDOW_SIZE = k') - Add a comment for each non-obvious step Interviewers read your code in real time; clean code makes it easier for them to follow and to score you.
4. Test with examples before claiming done: Trace through your code with 2-3 examples (normal case, empty input, single element, all duplicates). Walk the interviewer through the trace. Most interviewers will hint at edge cases if you miss them, but only if you invite the feedback by testing.
5. Manage time explicitly: At 20 minutes into a 45-minute round: 'I have a solution with O(n^2) time complexity. I think I can optimise it to O(n log n) using a priority queue. Should I implement the brute force first, or go straight to the optimised approach?' This demonstrates awareness of trade-offs and keeps the interviewer engaged in your decision-making.
Frequently asked questions
Explore more