Skip to main content
HireStepX is now in Beta! Be among the first to practice smarter and land your dream role.
Interview Skills

Competitive Programming for Interviews India 2026

Competitive programming guide for Indian interviews 2026: DSA topics by priority, LeetCode patterns, Codeforces strategy, for FAANG and top companies.

Interview Skills6 March 202613 min read4 sections

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.

4 sections

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)

  1. 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)

  1. Binary search: on sorted arrays AND on the answer (minimise the maximum, maximise the minimum; requires recognising that the answer space is monotonic)
  1. 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

  1. Heaps: top-K elements, merge K sorted lists, median from a data stream, task scheduler
  1. Stacks: next greater element, valid parentheses, largest rectangle in histogram (monotonic stack), min stack
  1. Linked lists: reverse, detect cycle (Floyd's), merge sorted lists, find middle (slow/fast pointer)
  1. Tries: autocomplete, word search, prefix count

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 habitsolve 1-2 problems every day consistently (6 days per week) rather than cramming 20 problems on the weekend. Spacing improves retention.

LeetCode vs Codeforces for Indian interview prep:

The differenceLeetCode: 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 prioritiseFor 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: 1. Speed: contest practice trains you to code faster under pressure; a 45-minute interview leaves little margin for slow implementation. 2. Volume: Codeforces Div 2 A/B problems provide high-volume fluency in arrays, greedy, and basic graph problems. 3. 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.

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

How long does it take to prepare for FAANG India coding interviews from scratch?

FAANG India coding interview preparation timeline: Starting from zero (no LeetCode experience, typical CS graduate): 4-6 months of consistent daily practice. Starting with some LeetCode experience (100-150 problems solved, mid-level software engineer): 2-3 months of focused company-specific preparation. What 'consistent daily practice' means: 1-2 problems per day, 6 days per week, for the full preparation period. This comes to 150-240 problems over 4-6 months, which is the typical volume needed for FAANG India readiness. Google India: the highest technical bar; focuses on algorithms and data structures at a harder level (LeetCode hard DP, graph algorithms). Preparation: 5-6 months minimum. Amazon India: Leadership Principles heavily weighted alongside coding; medium-hard LeetCode. Preparation: 3-4 months. Microsoft India: similar to Amazon in difficulty (LeetCode medium-hard). Preparation: 3-4 months. Meta India: strong focus on coding speed and cleanliness; medium difficulty but high volume in a short time. Preparation: 4-5 months. The biggest factor: consistency beats intensity. Candidates who burn out cramming 10 problems per day for 2 months consistently underperform compared to candidates who solve 1-2 problems per day for 5 months. Use HireStepX to practice explaining your coding approach out loud: the verbal explanation is a distinct skill from the coding itself and is often underpracticed.

What are the best resources for LeetCode and competitive programming preparation in India?

Best DSA and competitive programming resources for Indian candidates: For LeetCode preparation: Neetcode.io: a free resource that organises 150 high-quality LeetCode problems by pattern with video explanations; widely considered the best free LeetCode curriculum. Blind 75 list: the original curated 75-problem list; available on LeetCode as a study plan. Striver's DSA Sheet (by Raj Vikramaditya, YouTube channel 'take U forward'): an Indian YouTuber with very clear video explanations in both Hindi and English; extremely popular among Indian engineering students. For competitive programming: Codeforces: the primary platform for Indian competitive programmers; Div 2 contests every 2-3 weeks. CSES Problem Set: a curated set of ~300 high-quality competitive programming problems covering all major topics; widely used as a complement to Codeforces. Love Babbar's DSA course: popular paid course in Hindi with comprehensive coverage; particularly popular among tier-2 college students. For system design (after coding): Grokking the System Design Interview (Design Gurus): the most popular system design preparation resource globally. Gaurav Sen's YouTube channel: Indian system design content with clear explanations. 'Designing Data-Intensive Applications' by Martin Kleppmann: the gold standard book for understanding distributed systems deeply; recommended for SDE-2+ and FAANG India preparation.

Explore more

Continue reading

All posts

Practice

Know the answer. Now say it.

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.