Skip to main content

Flipkart Coding Interview Questions

25 Flipkart coding interview problems with full optimal solutions — 11 easy, 11 medium, 3 hard. Every problem ships with multiple approaches (brute-force first, then the optimal), complexity tables for each, company-specific tips on what an Flipkart interviewer values, and a FAQ section.

  • #1easyfoundational

    1. Two Sum

    Find two indices in an array whose values sum to a target — Flipkart uses this to gauge whether candidates default to brute force or reach for hash maps.

  • #2easyfoundational

    2. Valid Parentheses

    Validate that opening and closing brackets are balanced — Flipkart uses this to test stack intuition before scaling to nested order-state machines.

  • #3easyfoundational

    3. Merge Two Sorted Lists

    Merge two sorted linked lists into one sorted list — Flipkart asks this to test pointer manipulation before scaling to merging sorted shipment manifests.

  • #5easyfoundational

    5. Same Tree

    Check whether two binary trees are structurally identical with equal node values — Flipkart uses it to test recursion fluency before diving into category-tree problems.

  • #6easyfoundational

    6. Symmetric Tree

    Decide whether a binary tree is a mirror of itself — Flipkart uses it as a quick recursion warm-up before moving to inventory-tree questions.

  • #8easyfoundational

    8. Best Time to Buy and Sell Stock

    Find the max single-transaction profit from a price stream — Flipkart maps this to spotting the best discount window during a Big Billion Days sale event.

  • #9easyfoundational

    9. Single Number

    Find the only element appearing once in an array where every other element appears twice — Flipkart uses this as a bit-manipulation gateway before harder dedup problems.

  • #10easyfoundational

    10. Min Stack

    Design a stack with O(1) push, pop, top and getMin — Flipkart uses it to test whether candidates pick auxiliary structures over recomputation on every call.

  • #11easyfoundational

    11. Reverse Linked List

    Reverse a singly linked list iteratively and recursively — Flipkart uses it to confirm pointer hygiene before moving on to LRU-cache style problems.

  • #12mediumfoundational

    12. LRU Cache

    Implement an LRU cache with O(1) get and put — Flipkart asks this because inventory-snapshot lookups during flash sales must hit cache in microseconds.

  • #13mediumfoundational

    13. Number of Islands

    Count connected groups of land cells in a grid — Flipkart maps it to clustering nearby pincodes for warehouse coverage analysis.

  • #15mediumfoundational

    15. Product of Array Except Self

    Compute each index's product-of-all-others without division — Flipkart uses it to test the prefix-suffix trick that powers their cross-sell ranking scores.

  • #16mediumfoundational

    16. Find the Duplicate Number

    Find the duplicate in an array of n+1 integers in [1, n] without modifying it — Flipkart maps this to detecting double-charged COD orders in their payments pipeline.

  • #17mediumfoundational

    17. Top K Frequent Elements

    Return the k most frequent values in an array — Flipkart maps this to surfacing the top-K trending SKUs during a Big Billion Days sale event.

  • #18mediumfoundational

    18. Subarray Sum Equals K

    Count contiguous subarrays summing to a target — Flipkart uses it to test the prefix-sum + hash map pattern behind their daily sales-target reporting.

  • #19mediumfoundational

    19. Daily Temperatures

    For each day report how many days until a warmer temperature — Flipkart uses it to test monotonic-stack fluency before harder pricing-window problems.

  • #20mediumfoundational

    20. Rotting Oranges

    Compute the minutes until all fresh oranges rot in a 4-connected grid — Flipkart uses it to test multi-source BFS, the same model behind warehouse stockout propagation.

  • #21mediumfoundational

    21. Longest Common Subsequence

    Find the length of the longest common subsequence of two strings — Flipkart uses it to test 2-D DP fluency, the same shape used for fuzzy product-name dedupe.

  • #22mediumfoundational

    22. Successful Pairs of Spells and Potions

    For each spell strength, count potions whose product meets a success threshold — Flipkart uses this binary-search-on-sorted-array pattern for offer-eligibility checks during sale events.

  • #23hardfoundational

    23. Sliding Window Maximum

    Return the max of every length-k window in O(n) — Flipkart uses it to test deque fluency, the trick behind their per-pincode peak-traffic dashboards during sale spikes.

  • #24hardfoundational

    24. Find Median from Data Stream

    Maintain the running median of a number stream with O(log n) inserts and O(1) lookups — Flipkart uses it for live latency dashboards during Big Billion Days sale-event spike handling.

  • #25hardfoundational

    25. Modify Graph Edge Weights

    Assign positive weights to '-1' edges so the shortest source-to-destination path equals a given target — Flipkart uses it to test Dijkstra fluency for warehouse routing under SLA constraints.

Flipkart Coding Interview Questions — Full Solutions — InterviewChamp.AI