Top 15 Flipkart Coding Interview Problems (Pattern Guide)

- Flipkart's OA runs 3 problems in 90 minutes on HackerRank at medium-hard difficulty — partial solutions score points, so always submit
- Arrays and prefix sums appear in every online assessment; Subarray Sum Equals K and Group Anagrams are the most reported problems
- Binary Tree Maximum Path Sum (LC 124) is the most cited hard tree problem — post-order traversal with sign-aware arm contributions is the key
- Machine coding round is 90 minutes of working OOP code for a real system — a distinct skill unique among Indian product companies
- Sliding window max-count trick: in LC 424, max_count never needs to decrease, keeping the window from shrinking below its last valid size
- Heap problems in disguise: Kth Smallest in a Sorted Matrix is a min-heap problem, not a full matrix sort
- Think out loud — Flipkart interviewers score your reasoning process at every step, not just the final answer
Flipkart is one of India's most competitive engineering orgs. The DSA bar is real. The problems are not trivial. And interviewers genuinely care how you think, not just whether your code compiles without insulting them.
This post compiles the 15 most frequently reported Flipkart coding interview problems across SDE-1 and SDE-2 rounds, sourced from LeetCode Discuss threads, GeeksforGeeks interview experiences, and candidate write-ups from 2024 and 2025. Problems are grouped by pattern so your prep transfers, not just the individual problem.
Fair warning: I'll tell you which problems are widely corroborated and which are inferred from pattern clusters Flipkart reportedly tests. I won't pretend I have a direct line to their interviewer training docs.
What Flipkart's Coding Interview Actually Looks Like
The process typically runs four rounds: an online assessment (OA), two technical DSA rounds, a machine coding round, and a hiring manager conversation. For SDE-1, the OA is 90 minutes with three problems from medium to hard on HackerRank. For SDE-2, expect two DSA rounds where each has one medium and one hard.
The machine coding round is where Flipkart separates itself from most Indian product companies. You get 90 minutes to design and write working, object-oriented code for a system like a restaurant platform, appointment booking, or food ordering with capacity constraints. No pseudocode. Real, runnable classes. Your beautiful ASCII diagrams will not save you here.
In the DSA rounds, you're expected to walk through multiple approaches and articulate trade-offs. Interviewers report that candidates who explain their reasoning at each step consistently score higher than those who silently produce working code and then stare at the interviewer like they've just finished assembling IKEA furniture.
Arrays and Hashing Filter the OA
These show up most often in the online assessment. Flipkart likes problems that look brute-forceable but need a single-pass insight. You will brute-force them. The test cases will disagree with you. This is the process.
| Problem | LeetCode | Difficulty | Why Flipkart Asks It |
|---|---|---|---|
| Longest Substring Without Repeating Characters | 3 | Medium | Tests sliding window with a hash set |
| Subarray Sum Equals K | 560 | Medium | Prefix sum + hash map; easy to brute-force wrong |
| Group Anagrams | 49 | Medium | Hash map on sorted key or character count |
The insight Flipkart probes with subarray problems is whether you reach for prefix sums instinctively. Brute-force O(n²) passes maybe half the test cases. The O(n) solution requires recognizing that the cumulative sum up to index j minus the cumulative sum up to index i equals the target, reducing to a hash map lookup.
Group Anagrams is widely reported across multiple OA write-ups. The canonical approach uses a sorted string as the hash key. Flipkart interviewers have also asked the follow-up: can you avoid the O(k log k) sort per word? (Hint: character count array as the key. Now you have a follow-up answer. You're welcome.)

Every candidate at minute 60 of the 90-minute OA with one problem left.
Sliding Window: Know the Max-Count Trick
Flipkart tests sliding window with a preference for the variable-width variant, where the window expands and contracts based on a constraint. The fixed-width variant is just a warm-up.
| Problem | LeetCode | Difficulty | Why Flipkart Asks It |
|---|---|---|---|
| Minimum Window Substring | 76 | Hard | Classic two-pointer with a character frequency map |
| Longest Repeating Character Replacement | 424 | Medium | Safe approximation trick on max_count |
Minimum Window Substring has appeared in multiple SDE-2 reports. The approach is mechanically standard (two pointers, character counts, shrink left when valid), but candidates consistently fumble the edge cases around when to record the minimum window versus when to keep shrinking.
The 424 trick that separates prepared candidates: max_count never needs to decrease. Even if the window becomes invalid, hold on to the largest max_count seen so far. The window never shrinks below the size where it was last valid. This feels wrong until it clicks, and then you'll wonder why you ever doubted it. More on this in our sliding window deep dive.
Trees Require Post-Order Thinking
Binary tree problems at Flipkart push beyond level order traversal into problems requiring post-order reasoning. If "just do BFS" is your go-to tree strategy, the hard problems here will politely disagree with you.
| Problem | LeetCode | Difficulty | Why Flipkart Asks It |
|---|---|---|---|
| Binary Tree Maximum Path Sum | 124 | Hard | Post-order with a global max; tricky sign handling |
| Lowest Common Ancestor of a Binary Tree | 236 | Medium | Classic recursion, but LCA with parent pointers is a follow-up |
| Nodes at Distance K in Binary Tree | 863 | Medium | Convert tree to undirected graph, then BFS |
Binary Tree Maximum Path Sum is the most reported hard tree problem at Flipkart. At each node, you compute the best single-arm contribution for the parent, but update the global max using both arms. The negative subtree case breaks most candidates: you have to take max(arm_contribution, 0) before returning. Not taking the zero is the most common way this problem murders an otherwise solid candidate.
LCA with parent pointers showed up in at least one SDE-2 report. The interviewer gave a tree node struct with an explicit parent field and asked candidates to find LCA without recursing from the root. Clean solution: collect ancestors of one node into a set, then walk the other node's ancestor chain upward until you hit a match.
Nodes at Distance K is counterintuitive in the best possible way. Convert the binary tree to an undirected graph first, then BFS from the target node with depth tracking. Candidates who try to solve it purely via tree recursion usually get stuck somewhere around minute 25 with a look that says "this should be working."
DP Appears in Both OA and Tech Rounds
Flipkart favors grid-based DP and 1D DP with clear recurrences. No obscure bitmask problems. Just clean, classic DP where the trap is always in the base cases.
| Problem | LeetCode | Difficulty | Why Flipkart Asks It |
|---|---|---|---|
| Unique Paths with Obstacles | 63 | Medium | Grid DP; base case initialization matters |
| Coin Change | 322 | Medium | Classic unbounded knapsack |
| Word Break | 139 | Medium | DP over string prefixes with a set lookup |
Unique Paths with Obstacles catches candidates on base cases: if any cell in the first row or column contains an obstacle, all cells beyond it should be zero, not one. Flipkart has used this problem as an OA filter where candidates who passed most but not all test cases were cut. That one failing test case is almost always the obstacle-in-the-first-row scenario.
Word Break tests whether you memoize on the start index rather than generating all prefix substrings naively. DP[i] = "can the first i characters be segmented" is clean. Getting there without a hint is what the interviewer watches for.
For more DP patterns, see our top 50 LeetCode mediums guide.
Stacks: Know the Space-Optimal Variants
Multiple SDE-2 reports from 2024 mention stack-based problems as a consistent presence in Round 1 or Round 2.
| Problem | LeetCode | Difficulty |
|---|---|---|
| Min Stack | 155 | Medium |
| Trapping Rain Water | 42 | Hard |
Min Stack with O(1) time and O(1) extra space is a known Flipkart variant. The trick is encoding (value - current_min) when the new value is smaller, so you can recover the previous minimum on pop. The standard auxiliary-stack solution works, but interviewers will ask for the space-optimal version as a follow-up. Know it cold.
Trapping Rain Water is the problem where two pointers surprise candidates who framed it as precompute. If leftMax is less than rightMax, the water at the left pointer is determined by leftMax regardless of what's on the right. You don't need the exact right boundary, just that it's at least as tall as the left. Two pointers drops it from O(n) space to O(1) and makes the precompute solution feel embarrassingly chunky in hindsight.
Graph Problems Often Disguise Themselves
Flipkart uses graph problems to test BFS and DFS fluency, often with grid inputs or problems that require recognizing an implicit graph. The word "graph" will not appear in the problem statement. That's the whole game.
| Problem | LeetCode | Difficulty | Why Flipkart Asks It |
|---|---|---|---|
| Number of Islands | 200 | Medium | BFS/DFS on a grid, connected components |
| Clone Graph | 133 | Medium | DFS with a hash map tracking original to clone |
| Reconstruct Itinerary | 332 | Hard | Eulerian path via Hierholzer's algorithm |
Number of Islands is widely reported at Flipkart and across nearly every Indian product company. The follow-up Flipkart reportedly asks: how would you handle this if the grid doesn't fit in memory? The answer requires thinking about external BFS and functions as a soft system design probe. It's the interviewer's way of checking if you understand distributed thinking without formally asking a system design question.
Reconstruct Itinerary is hard because most candidates never encounter Eulerian paths, so they reach for standard DFS and get confused by the backtracking. Hierholzer's builds the path by greedily taking the lexicographically smallest next airport, then reversing. It rewards candidates who know graph theory beyond traversal and punishes everyone else with increasing desperation.
Three Heap Problems, One Pattern
| Problem | LeetCode | Difficulty |
|---|---|---|
| Kth Largest Element in an Array | 215 | Medium |
| Find K Closest Points to Origin | 973 | Medium |
| Kth Smallest Element in a Sorted Matrix | 378 | Medium |
All three test the same thing: when you need the kth element, reach for a heap of size k. Kth Smallest in a Sorted Matrix is a heap problem disguised as a matrix problem. Push (value, row, col) for the first element of each row into a min-heap, then pop k times, pushing the next element in that row each time. Candidates who full-sort the matrix miss the O(k log n) opportunity.
The follow-up Flipkart asks is usually: can you do better than O(n log k)? For Kth Largest in an unsorted array, QuickSelect brings the average case to O(n). Worth knowing cold.

Full-sorting the matrix to find the kth element (top) vs popping from a min-heap of size n (bottom).
How to Prepare Specifically for Flipkart
Weight your prep by frequency: arrays and hashing first (they appear in every OA), then trees and DP, then graphs and stacks, then heaps.
Practice talking while you think. Flipkart interviewers consistently note that candidates who articulate their reasoning out loud, including wrong turns, score higher than those who work silently and produce the answer. The rubric rewards process, not just answers. Silence reads as uncertainty even when your solution is correct.
For the machine coding round, practice building small systems from scratch in under 90 minutes: reservation systems, shopping carts, rate limiters. Focus on clean class boundaries. The evaluation is on code quality and design, not runtime optimization. A working LLD with reasonable separation of concerns beats an O(1) lookup bolted onto a God class.
The fastest way to close the talking-while-thinking gap is repetition under real pressure. SpaceComplexity simulates DSA rounds with voice-based interaction and rubric feedback so you can train that skill before your actual interview, not during it.
The Short Version
- The Flipkart OA runs 3 problems in 90 minutes at medium-hard difficulty. Partial solutions matter, so always submit.
- Arrays, trees, and DP appear most consistently across reported experiences.
- Machine coding is a distinct skill. Practice building working OOP systems in under 90 minutes.
- Interviewers evaluate your reasoning process, not just your final answer. Think out loud.
- Follow-up questions are almost guaranteed. Know your complexity before you finish writing.
- At SDE-2, expect at least one hard per round and be ready to optimize past your first correct solution.
Related posts: Top 50 LeetCode Medium Problems | DSA for Backend Engineers | Amazon Coding Interview Problems
Further Reading
- Flipkart SDE-2 Interview Experiences on LeetCode Discuss - Candidate-reported problems with round-by-round breakdown
- Flipkart Interview Experiences on GeeksforGeeks - Aggregated write-ups across multiple years and levels
- Binary Tree Maximum Path Sum on LeetCode - The canonical problem with community solutions
- Flipkart Engineering Blog - Engineering culture and system design context
- workat.tech Flipkart DSA Problems - Curated list from candidate reports