Flipkart Coding Interview Questions: OA, LLD & Technical Interview

Flipkart is India's largest homegrown e-commerce company, hiring Software Development Engineers through both an annual campus drive (SDE Intern with a full time conversion) and an off campus pipeline. The process leans on strong DSA fundamentals in the early rounds, then shifts to object oriented low level design and system thinking in the later technical rounds as you move closer to the hiring manager stage.

This guide is organized by interview stage, online assessment, low level design, and technical interview, based on questions actually reported by candidates. Every algorithmic problem includes the exact question, a worked example, the right approach, and time or space complexity, while the design questions are presented as the requirement briefs candidates actually received.

Flipkart Hiring Process for Fresher Roles

1. Application and Eligibility

  • B.E./B.Tech, hired mainly through an annual campus drive as SDE Intern with conversion to full time SDE-1 based on performance, plus an off campus careers page pipeline.
  • A resume and CGPA based shortlist typically precedes the online assessment.

2. Online Assessment (HackerRank) 90 minutes

  • Usually 2 coding problems ranging from medium to hard difficulty, plus MCQs covering OOPs, DBMS, OS, and quantitative aptitude.
  • Test case pass percentage matters, so an optimized partial solution generally scores better than an unattempted problem.

3. Technical Interview 1 (DSA Focus) 45 to 60 minutes

  • 2 DSA problems solved live, typically arrays, strings, trees, or graphs, with the interviewer pushing for an optimal solution after a working brute force.

4. Technical Interview 2 (DSA + Low Level Design) 60 minutes

  • A harder DSA problem followed by an object oriented design problem, such as designing a system like Splitwise, a parking lot, or an elevator, where you define classes, relationships, and key methods.

5. Technical Interview 3 / Hiring Manager Round

  • A project deep dive, high level system thinking for an e-commerce style feature such as a cart or inventory service, and behavioral questions about ownership and handling ambiguity.

6. HR Round

  • Motivation, culture fit, and logistics such as location preference and notice period.

Preparation Resources

Part 1 Flipkart Online Assessment (OA) Questions

The OA runs on HackerRank, 90 minutes, typically 2 coding problems at medium to hard difficulty plus MCQs on OOPs, DBMS, OS, and aptitude.

1. Maximum Profit From At Most Two Order Batches Medium

OA Arrays · DP

Given an array of daily prices for a product, find the maximum profit achievable by completing at most two buy-sell transactions, where you must sell before buying again.

Input: prices = [3, 3, 5, 0, 0, 3, 1, 4]
Output: 6
Why: buy at 0, sell at 3 (profit 3), buy at 1, sell at 4 (profit 3), total 6

Approach: Track four running values, max profit after the first buy, first sell, second buy, and second sell, updating each from left to right in a single pass, where each value depends only on the previous day's values.

Complexity: Time O(n) · Space O(1)

Follow-up: How would you generalize this to at most K transactions instead of exactly two?

2. Shortest Route Through Warehouse Zones Medium

OA Graphs · Dijkstra

Given a warehouse represented as a grid of zones with a travel cost to enter each zone, find the minimum total cost path for a picker to travel from the entrance zone to the packing zone, moving only in four directions.

Input: grid = [[1,3,1],[1,5,1],[4,2,1]]
Output: 7
Why: the path 1 -> 3 -> 1 -> 1 -> 1 down the right side minimizes total cost

Approach: Treat each cell as a graph node with an edge cost equal to the destination cell's value, then run Dijkstra's algorithm, or since costs are non negative and the grid is dense, a DP relaxation, from the entrance to the packing zone.

Complexity: Time O(rows * cols log(rows * cols)) with a priority queue · Space O(rows * cols)

Follow-up: How would you adapt this if some zones could only be entered from specific directions, for example one way conveyor paths?

3. Longest Substring With At Most K Distinct SKU Codes Medium

OA Sliding Window

Given a string representing a sequence of scanned SKU category codes, find the length of the longest contiguous substring that contains at most K distinct characters.

Input: s = "eceba", k = 2
Output: 3
Why: the substring "ece" has at most 2 distinct characters

Approach: Maintain a sliding window with a hash map counting character frequencies inside the window. Expand the window by moving the right pointer, and whenever the distinct character count exceeds K, shrink from the left until it is valid again, tracking the maximum window length seen.

Complexity: Time O(n) · Space O(K)

Follow-up: How would you handle K changing dynamically for different queries on the same string, without recomputing from scratch each time?

4. Detect a Cycle in the Order Dependency Graph Easy

OA Graphs · DFS

Given a list of order processing steps and dependency pairs where step A must complete before step B, determine whether a valid processing order exists, or whether the dependencies contain a cycle.

Input: n = 4, dependencies = [[1,0],[2,1],[3,2]]
Output: true
Input: n = 2, dependencies = [[0,1],[1,0]]
Output: false

Approach: Build a directed graph from the dependencies, then run a depth first search tracking nodes in the current recursion path. If a DFS ever revisits a node still on the current path, a cycle exists, otherwise the graph is a valid DAG.

Complexity: Time O(V + E) · Space O(V + E)

Follow-up: How would you output one valid processing order, not just whether one exists?

5. Reorganize Inventory String by Frequency Medium

OA Heap · Greedy

Given a string of item category letters, rearrange the characters so that no two adjacent characters are the same, and return any valid rearrangement, or indicate it is impossible.

Input: s = "aab"
Output: "aba"
Input: s = "aaab"
Output: "" (impossible)

Approach: Count the frequency of each character, then use a max heap keyed on frequency. Repeatedly pop the two most frequent characters, append each once to the result, and push them back with a decremented count if still positive, which guarantees no two adjacent characters match.

Complexity: Time O(n log 26) which simplifies to O(n) · Space O(n)

Follow-up: How would you check impossibility up front without running the full construction?

6. Minimum Deliveries to Cover All Pincodes Hard

OA Greedy · Sets

Given a list of delivery routes, each covering a set of pincodes, find the minimum number of routes needed so that every pincode in a target set is covered by at least one chosen route.

Input: routes = [{1,2,3},{2,4},{3,4,5}], target = {1,2,3,4,5}
Output: 2
Why: routes 0 and 2 together cover {1,2,3,4,5}

Approach: This is the classic set cover problem, NP-hard in general, so use the greedy approximation, repeatedly pick the route that covers the largest number of still uncovered pincodes, remove those pincodes from the target, and repeat until the target is empty or no route helps further.

Complexity: Time O(routes^2 * pincodes) for the greedy passes · Space O(pincodes)

Follow-up: How would you know if the greedy answer is optimal for a given input, versus only an approximation?

7. Median of Two Sorted Price Lists Hard

OA Binary Search

Given two sorted arrays of prices from two different sellers for comparable products, find the median of the combined set of prices without fully merging the arrays.

Input: seller1 = [1, 3], seller2 = [2]
Output: 2.0
Input: seller1 = [1, 2], seller2 = [3, 4]
Output: 2.5

Approach: Binary search on the smaller array to pick a partition point, and derive the matching partition point in the other array so that the left side has exactly half the total elements. Adjust the partition based on whether the boundary elements are correctly ordered, until the correct partition is found, then read the median from the boundary values.

Complexity: Time O(log(min(m, n))) · Space O(1)

Follow-up: How would you support this query efficiently if prices from both sellers are updated frequently?

8. Word Search in a Category Tag Grid Medium

OA Backtracking

Given a 2D grid of characters and a target word, determine whether the word can be formed by a sequence of adjacent cells, horizontally or vertically, without reusing the same cell twice.

Input: grid = [["A","B","C"],["S","F","C"],["A","D","E"]], word = "ABCCED"
Output: true

Approach: Try every cell as a starting point, and from a matching cell, recursively explore its four neighbours for the next character, marking the current cell visited before recursing and unmarking it on backtrack, stopping early as soon as the full word is matched.

Complexity: Time O(rows * cols * 4^L) where L is the word length in the worst case · Space O(L) for the recursion stack

Follow-up: How would you optimize this if you needed to search for many different words against the same grid?

9. Trapping Rainwater Between Warehouse Racks Hard

OA Two Pointers

Given an array representing rack heights along a warehouse aisle, compute how much water could be trapped between the racks after rain, where water above a rack is bounded by the tallest racks to its left and right.

Input: heights = [0,1,0,2,1,0,1,3,2,1,2,1]
Output: 6

Approach: Use two pointers starting from both ends, tracking the maximum height seen so far from each side. Move the pointer on the side with the smaller running maximum inward, adding the difference between that running maximum and the current height to the trapped total at each step.

Complexity: Time O(n) · Space O(1)

Follow-up: How would you adapt this to a 2D grid of heights instead of a 1D array?

Part 2 Flipkart Low Level Design Round

Flipkart's second and third technical rounds commonly move from pure DSA into object oriented low level design, reflecting the fact that day to day engineering work is building and extending large scale e-commerce services. You are expected to identify entities, define classes with clear responsibilities, and model relationships, then often implement one core method live.

10. Design a Shopping Cart and Checkout System Hard

Onsite LLD · OOP

Design a shopping cart system that lets a user add and remove items with quantities, apply discount coupons, and compute a final checkout total, where different coupon types, flat, percentage, and buy-one-get-one, can be combined under specific rules.

Discussion points: how cart line items are modeled, how coupon eligibility and
stacking rules are validated, and how the total is recomputed cleanly whenever the
cart changes

Approach: Model CartItem holding a product reference and quantity, and Cart as a collection of items exposing add, remove, and update quantity. Represent each coupon type as an implementation of a common DiscountStrategy interface with an apply(cart) method, so new coupon types can be added without modifying the cart itself, and a CheckoutService composes the applicable strategies to compute the final total.

Complexity: Time O(items + coupons) per checkout computation · Space O(items)

Follow-up: How would you handle a race condition where two checkout requests for the same cart arrive concurrently?

11. Design a Product Inventory and Stock Reservation System Medium

Onsite LLD · Concurrency

Design a system that tracks available stock per product across warehouses, temporarily reserves stock when a customer starts checkout, and releases the reservation if checkout is not completed within a timeout window.

Discussion points: how a reservation is tied to a specific order attempt, how
concurrent reservations for the same product are prevented from overselling stock,
and how an expired reservation is released back to available stock

Approach: Model StockItem per product per warehouse with an available count and a reserved count. A reserve(productId, qty) call atomically checks and decrements available stock while incrementing reserved stock, guarded by a lock or an atomic compare and swap per product to prevent overselling under concurrent requests. A background job or a scheduled expiry releases reservations whose checkout never completed within the timeout.

Complexity: Time O(1) per reservation or release with per product locking · Space O(products * warehouses)

Follow-up: How would you extend this design to reserve stock from the nearest warehouse to the customer instead of a single fixed warehouse?

12. Design a Product Review and Rating Aggregation System Medium

Onsite LLD · OOP

Design a system where customers submit star ratings and text reviews for products, and the product page always shows an up to date average rating and rating count without recomputing over every review on each page view.

Discussion points: how the running average is kept up to date efficiently as new
reviews arrive, how a customer editing or deleting a review is handled, and how one
customer is prevented from submitting multiple reviews for the same product

Approach: Model Review linked to a product and customer, with a uniqueness constraint on the (product, customer) pair. Maintain a denormalized ProductRatingSummary per product holding the running sum and count, updated incrementally, add the new rating to the sum and increment the count on a new review, and adjust the sum by the delta on an edit, or decrement both on a delete, so the average is always O(1) to read.

Complexity: Time O(1) for read or update of the summary · Space O(products + reviews)

Follow-up: How would you extend this to also support a "most helpful" review ranking based on upvotes, without scanning every review per request?

13. Design a Price Drop Notification System Hard

Onsite LLD · Observer Pattern

Design a system that lets customers subscribe to a product for price drop alerts, and notifies every subscribed customer, via push notification or email, whenever that product's price decreases, without scanning the entire subscriber list for every unrelated price update.

Discussion points: how subscriptions are indexed by product so unrelated price
changes do not trigger a scan, how notification delivery is decoupled from the
price update path so a slow notification channel does not block pricing updates,
and how a customer unsubscribing is handled cleanly

Approach: Index Subscription records by product id in a hash map from product id to the list of subscribed customers, so a price update only looks up subscribers for that exact product. Use the observer pattern, a PriceChangeEvent is published to an internal queue when a price drops, and a separate notification worker consumes the queue and fans out to each subscriber's preferred channel, keeping the pricing write path fast and decoupled from delivery.

Complexity: Time O(1) to look up subscribers for a price change · Space O(subscriptions)

Follow-up: How would you avoid spamming a customer with repeated alerts if a price fluctuates up and down multiple times in a short window?

14. Design a Coupon Code Validation and Usage Limiter Medium

Onsite LLD · Concurrency

Design a system that validates a coupon code at checkout, enforcing a global maximum redemption count and a per customer maximum redemption count, correctly even when many customers try to redeem the same limited coupon at the same time.

Discussion points: how the global redemption count is checked and incremented
atomically under concurrent checkouts, how a per customer limit is enforced
without a separate slow lookup for every check, and what happens if checkout
fails after the coupon was already counted as redeemed

Approach: Model Coupon with a global redemption cap and a running redeemed count, and a CustomerCouponUsage record per (coupon, customer) pair. Validation and increment happen as a single atomic operation, using a database row lock or an atomic counter, so two concurrent checkouts cannot both pass the "under the cap" check before either increments. If checkout later fails, the reservation is rolled back by decrementing the count, similar to the stock reservation design.

Complexity: Time O(1) per validation with atomic increment/decrement · Space O(coupons + customer usage records)

Follow-up: How would you extend this design to support a coupon that is valid only for a specific category of products, without re-validating the entire cart on every check?

Part 3 Flipkart Technical & HR Interview Questions

Beyond DSA and design, Flipkart interviewers consistently probe CS fundamentals and system thinking at e-commerce scale, since the role involves services handling high traffic, especially around sale events.

Systems and CS Fundamentals Focus Areas

Real questions reported by candidates in the technical interview rounds:

  • Explain the four pillars of OOP with an example from a project you built.
  • How would you design a database schema for an e-commerce order and inventory system.
  • What is the difference between SQL joins, inner, left, right, and full outer, with examples.
  • How does indexing improve database query performance, and what is the trade off.
  • How would you design a system to handle a massive traffic spike during a flash sale.
  • What is the difference between horizontal and vertical scaling, and when would you choose each.
  • What caching strategies would you use for a product catalog page, and how would you keep the cache consistent with the source of truth.
  • Explain the CAP theorem and how it applies to a distributed order processing system.
  • What is a race condition, and how would you prevent one when two requests try to buy the last unit of a product.
  • Walk through your favourite or most challenging project, and explain a design decision you would change if you rebuilt it today.

Complete Interview Questions

HR Interview Tips

The HR round checks motivation, culture fit, and logistics. Common questions include:

  • Tell me about yourself.
  • What do you know about Flipkart, and which of its products or features have you used.
  • Why do you want to work in e-commerce specifically.
  • Where do you see yourself in five years.
  • What are your strengths and weaknesses.
  • Describe a time you took ownership of an ambiguous problem with no clear instructions.
  • Are you comfortable with the notice period and location requirements for this role.

Complete HR Interview Questions

Preparation Tips

  • Do not stop at DSA. Flipkart's later rounds weigh object oriented low level design, designing systems like a shopping cart, inventory reservation, or review aggregation, just as heavily as algorithmic problem solving, so practice sketching class diagrams under time pressure.
  • Think at e-commerce scale. Questions about flash sale traffic spikes, caching, and preventing overselling under concurrency come up often, even for fresher roles, since Flipkart's systems are built around high traffic sale events.
  • Practice explaining trade offs out loud. Design rounds reward reasoning about alternatives, such as pessimistic locking versus optimistic reservation for stock, not just arriving at one working answer.
  • Know the product. Flipkart interviewers often ask what you know about the company and its various verticals, so spend real time exploring the app and understanding recent features before your interview.

Join our Telegram group to discuss more Flipkart interview questions and prep strategies!

Useful Resources for Your Placement Prep