Problem database last updated: June 20, 2025

FFlipkart logo

Flipkart Coding Interview Questions

99 problems · 10 Easy, 57 Medium, 32 Hard · Ranked #15 of 458

Difficulty breakdown

10 Easy

10% · avg 23%

57 Medium

58% · avg 59%

32 Hard

32% · avg 18%

Top topics

array
79.8%
dynamic-programming
26.3%
hash-table
21.2%
greedy
20.2%2.4x
sorting
19.2%
breadth-first-search
16.2%2x

Interview profile

Based on 99 reported problems, Flipkart interviews are significantly harder than average - 32% Hard vs 18% across all companies. The majority (58%) of questions are Medium difficulty, which is typical for companies that want to see solid fundamentals without excessive trick questions.

Compared to the industry average, Flipkart puts unusual emphasis on monotonic-queue (2% of problems, 2.9x the industry average), heap-priority-queue (15.2% of problems, 2.5x the industry average), greedy (20.2% of problems, 2.4x the industry average). If you're short on time, these are the categories to double down on.

The most common topics are array (79.8%), dynamic-programming (26.3%), hash-table (21.2%), greedy (20.2%). Problems below are sorted by frequency, the ones at the top are asked most often.

All 99 problems

Smallest Range Covering Elements from K Lists

Solve

You have k lists of sorted integers in non-decreasing order. Find the smallest range that includes at least one number from each of the k lists.

HardVery Likely
arrayhash-tablegreedy

Shortest Bridge

Solve

You are given an n x n binary matrix grid where 1 represents land and 0 represents water.

MediumVery Likely
arraydepth-first-searchbreadth-first-search

Trapping Rain Water

Solve

Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining.

HardVery Likely
arraytwo-pointersdynamic-programming

Maximum Points You Can Obtain from Cards

Solve

There are several cards arranged in a row, and each card has an associated number of points. The points are given in the integer array cardPoints.

MediumVery Likely
arraysliding-windowprefix-sum

Design Movie Rental System

Solve

You have a movie renting company consisting of n shops. You want to implement a renting system that supports searching for, booking, and returning movies. The s...

HardVery Likely
arrayhash-tabledesign

Minimum Number of Coins to be Added

Solve

You are given a 0-indexed integer array coins, representing the values of the coins available, and an integer target.

MediumVery Likely
arraygreedysorting

Capacity To Ship Packages Within D Days

Solve

A conveyor belt has packages that must be shipped from one port to another within days days.

MediumVery Likely
arraybinary-search

Minimum Limit of Balls in a Bag

Solve

You are given an integer array nums where the ith bag contains nums[i] balls. You are also given an integer maxOperations.

MediumVery Likely
arraybinary-search

Numbers With Same Consecutive Differences

Solve

Given two integers n and k, return an array of all the integers of length n where the difference between every two consecutive digits is k. You may return the a...

MediumVery Likely
backtrackingbreadth-first-search

The Score of Students Solving Math Expression

Solve

You are given a string s that contains digits 0-9, addition symbols '+', and multiplication symbols '' only, representing a valid math expression of single digi...

HardVery Likely
arrayhash-tablemath

Triples with Bitwise AND Equal To Zero

Solve

Given an integer array nums, return the number of AND triples.

HardVery Likely
arrayhash-tablebit-manipulation

Minimum Total Cost to Make Arrays Unequal

Solve

You are given two 0-indexed integer arrays nums1 and nums2, of equal length n.

HardVery Likely
arrayhash-tablegreedy

Container With Most Water

Solve

You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the ith line are (i, 0) and (i, height[i]).

MediumVery Likely
arraytwo-pointersgreedy

Asteroid Collision

Solve

We are given an array asteroids of integers representing asteroids in a row. The indices of the asteroid in the array represent their relative position in space...

MediumVery Likely
arraystacksimulation

Binary Tree Maximum Path Sum

Solve

A path in a binary tree is a sequence of nodes where each pair of adjacent nodes in the sequence has an edge connecting them. A node can only appear in the sequ...

HardVery Likely
dynamic-programmingtreedepth-first-search

Koko Eating Bananas

Solve

Koko loves to eat bananas. There are n piles of bananas, the ith pile has piles[i] bananas. The guards have gone and will come back in h hours.

MediumVery Likely
arraybinary-search

Longest Substring Without Repeating Characters

Solve

Given a string s, find the length of the longest substring without duplicate characters.

MediumVery Likely
hash-tablestringsliding-window

Cherry Pickup II

Solve

You are given a rows x cols matrix grid representing a field of cherries where grid[i][j] represents the number of cherries that you can collect from the (i, j)...

HardLikely
arraydynamic-programmingmatrix

Minimum Adjacent Swaps for K Consecutive Ones

Solve

You are given an integer array, nums, and an integer k. nums comprises of only 0's and 1's. In one move, you can choose two adjacent indices and swap their valu...

HardLikely
arraygreedysliding-window

Product of Array Except Self

Solve

Given an integer array nums, return an array answer such that answer[i] is equal to the product of all the elements of nums except nums[i].

MediumLikely
arrayprefix-sum

Strong Password Checker

Solve

A password is considered strong if the below conditions are all met:

HardLikely
stringgreedyheap-priority-queue

Create Maximum Number

Solve

You are given two integer arrays nums1 and nums2 of lengths m and n respectively. nums1 and nums2 represent the digits of two numbers. You are also given an int...

HardLikely
arraytwo-pointersstack

Two Sum

Solve

Given an array of integers nums and an integer target, return the indices of the two numbers that add up to target.

EasyLikely
arrayhash-map

Gas Station

Solve

There are n gas stations along a circular route, where the amount of gas at the ith station is gas[i].

MediumLikely
arraygreedy

Rotting Oranges

Solve

You are given an m x n grid where each cell can have one of three values:

MediumLikely
arraybreadth-first-searchmatrix

Maximum Profit in Job Scheduling

Solve

We have n jobs, where every job is scheduled to be done from startTime[i] to endTime[i], obtaining a profit of profit[i].

HardLikely
arraybinary-searchdynamic-programming

Number of Islands

Solve

Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands.

MediumLikely
arraydepth-first-searchbreadth-first-search

Course Schedule

Solve

There are a total of numCourses courses you have to take, labeled from 0 to numCourses - 1. You are given an array prerequisites where prerequisites[i] = [ai, b...

MediumLikely
depth-first-searchbreadth-first-searchgraph

Sort Colors

Solve

Given an array nums with n objects colored red, white, or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the order...

MediumLikely
arraytwo-pointerssorting

First Missing Positive

Solve

Given an unsorted integer array nums. Return the smallest positive integer that is not present in nums.

HardLikely
arrayhash-table

Binary Tree Zigzag Level Order Traversal

Solve

Given the root of a binary tree, return the zigzag level order traversal of its nodes' values. (i.e., from left to right, then right to left for the next level...

MediumLikely
treebreadth-first-searchbinary-tree

Largest Rectangle in Histogram

Solve

Given an array of integers heights representing the histogram's bar height where the width of each bar is 1, return the area of the largest rectangle in the his...

HardLikely
arraystackmonotonic-stack

Decode Ways

Solve

You have intercepted a secret message encoded as a string of numbers. The message is decoded via the following mapping:

MediumLikely
stringdynamic-programming

Burst Balloons

Solve

You are given n balloons, indexed from 0 to n - 1. Each balloon is painted with a number on it represented by an array nums. You are asked to burst all the ball...

HardLikely
arraydynamic-programming

Dungeon Game

Solve

The demons had captured the princess and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of m x n rooms laid out in a 2D grid. Our...

HardLikely
arraydynamic-programmingmatrix

Median of Two Sorted Arrays

Solve

Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays.

HardLikely
arraybinary-searchdivide-and-conquer

Find K-th Smallest Pair Distance

Solve

The distance of a pair of integers a and b is defined as the absolute difference between a and b.

HardLikely
arraytwo-pointersbinary-search

Edit Distance

Solve

Given two strings word1 and word2, return the minimum number of operations required to convert word1 to word2.

MediumLikely
stringdynamic-programming

Partition Equal Subset Sum

Solve

Given an integer array nums, return true if you can partition the array into two subsets such that the sum of the elements in both subsets is equal or false oth...

MediumLikely
arraydynamic-programming

Subarray Sum Equals K

Solve

Given an array of integers nums and an integer k, return the total number of subarrays whose sum equals to k.

MediumLikely
arrayhash-tableprefix-sum

Merge Two Sorted Lists

Solve

You are given the heads of two sorted linked lists list1 and list2.

EasyLikely
linked-listrecursion

Maximum Width of Binary Tree

Solve

Given the root of a binary tree, return the maximum width of the given tree.

MediumLikely
treedepth-first-searchbreadth-first-search

Maximum Performance of a Team

Solve

You are given two integers n and k and two integer arrays speed and efficiency both of length n. There are n engineers numbered from 1 to n. speed[i] and effici...

HardLikely
arraygreedysorting

Merge Intervals

Solve

Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals that cove...

MediumLikely
arraysorting

3Sum

Solve

Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0.

MediumLikely
arraytwo-pointerssorting

Find Peak Element

Solve

A peak element is an element that is strictly greater than its neighbors.

MediumLikely
arraybinary-search

Candy

Solve

There are n children standing in a line. Each child is assigned a rating value given in the integer array ratings.

HardLikely
arraygreedy

Remove Duplicates from Sorted Array

Solve

Given an integer array nums sorted in non-decreasing order, remove the duplicates in-place such that each unique element appears only once. The relative order o...

EasyLikely
arraytwo-pointers

House Robber

Solve

You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from rob...

MediumLikely
arraydynamic-programming

Next Greater Element I

Solve

The next greater element of some element x in an array is the first greater element that is to the right of x in the same array.

EasyLikely
arrayhash-tablestack

01 Matrix

Solve

Given an m x n binary matrix mat, return the distance of the nearest 0 for each cell.

MediumLikely
arraydynamic-programmingbreadth-first-search

Search in Rotated Sorted Array

Solve

There is an integer array nums sorted in ascending order (with distinct values).

MediumLikely
arraybinary-search

Jump Game

Solve

You are given an integer array nums. You are initially positioned at the array's first index, and each element in the array represents your maximum jump length...

MediumLikely
arraydynamic-programminggreedy

Maximal Rectangle

Solve

Given a rows x cols binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area.

HardLikely
arraydynamic-programmingstack

Cherry Pickup

Solve

You are given an n x n grid representing a field of cherries, each cell is one of three possible integers.

HardLikely
arraydynamic-programmingmatrix

Rank Teams by Votes

Solve

In a special ranking system, each voter gives a rank from highest to lowest to all teams participating in the competition.

MediumLikely
arrayhash-tablestring

Lowest Common Ancestor of a Binary Tree

Solve

Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree.

MediumLikely
treedepth-first-searchbinary-tree

Word Break

Solve

Given a string s and a dictionary of strings wordDict, return true if s can be segmented into a space-separated sequence of one or more dictionary words.

MediumLikely
arrayhash-tablestring

Reconstruct Itinerary

Solve

You are given a list of airline tickets where tickets[i] = [fromi, toi] represent the departure and the arrival airports of one flight. Reconstruct the itinerar...

HardLikely
arraystringdepth-first-search

Open the Lock

Solve

You have a lock in front of you with 4 circular wheels. Each wheel has 10 slots: '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'. The wheels can rotate freely...

MediumLikely
arrayhash-tablestring

Predict the Winner

Solve

You are given an integer array nums. Two players are playing a game with this array: player 1 and player 2.

MediumLikely
arraymathdynamic-programming

Copy List with Random Pointer

Solve

A linked list of length n is given such that each node contains an additional random pointer, which could point to any node in the list, or null.

MediumLikely
hash-tablelinked-list

Number of Students Unable to Eat Lunch

Solve

The school cafeteria offers circular and square sandwiches at lunch break, referred to by numbers 0 and 1 respectively. All students stand in a queue. Each stud...

EasyLikely
arraystackqueue

Cut Off Trees for Golf Event

Solve

You are asked to cut off all the trees in a forest for a golf event. The forest is represented as an m x n matrix. In this matrix:

HardLikely
arraybreadth-first-searchheap-priority-queue

Amount of Time for Binary Tree to Be Infected

Solve

You are given the root of a binary tree with unique values, and an integer start. At minute 0, an infection starts from the node with value start.

MediumLikely
hash-tabletreedepth-first-search

Furthest Building You Can Reach

Solve

You are given an integer array heights representing the heights of buildings, some bricks, and some ladders.

MediumSometimes
arraygreedyheap-priority-queue

Longest Repeating Character Replacement

Solve

You are given a string s and an integer k. You can choose any character of the string and change it to any other uppercase English character. You can perform th...

MediumSometimes
hash-tablestringsliding-window

All Nodes Distance K in Binary Tree

Solve

Given the root of a binary tree, the value of a target node target, and an integer k, return an array of the values of all nodes that have a distance k from the...

MediumSometimes
hash-tabletreedepth-first-search

Minimum Number of Refueling Stops

Solve

A car travels from a starting position to a destination which is target miles east of the starting position.

HardSometimes
arraydynamic-programminggreedy

Maximum Running Time of N Computers

Solve

You have n computers. You are given the integer n and a 0-indexed integer array batteries where the ith battery can run a computer for batteries[i] minutes. You...

HardSometimes
arraybinary-searchgreedy

Sliding Window Maximum

Solve

You are given an array of integers nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see...

HardSometimes
arrayqueuesliding-window

Patching Array

Solve

Given a sorted integer array nums and an integer n, add/patch elements to the array such that any number in the range [1, n] inclusive can be formed by the sum...

HardSometimes
arraygreedy

Longest String Chain

Solve

You are given an array of words where each word consists of lowercase English letters.

MediumSometimes
arrayhash-tabletwo-pointers

Path Sum II

Solve

Given the root of a binary tree and an integer targetSum, return all root-to-leaf paths where the sum of the node values in the path equals targetSum. Each path...

MediumSometimes
backtrackingtreedepth-first-search

Surrounded Regions

Solve

You are given an m x n matrix board containing letters 'X' and 'O', capture regions that are surrounded:

MediumSometimes
arraydepth-first-searchbreadth-first-search

Crawler Log Folder

Solve

The Leetcode file system keeps a log each time some user performs a change folder operation.

EasySometimes
arraystringstack

Longest Consecutive Sequence

Solve

Given an unsorted array of integers nums, return the length of the longest consecutive elements sequence.

MediumSometimes
arrayhash-tableunion-find

Minimum Number of Taps to Open to Water a Garden

Solve

There is a one-dimensional garden on the x-axis. The garden starts at the point 0 and ends at the point n. (i.e., the length of the garden is n).

HardSometimes
arraydynamic-programminggreedy

Unique Paths II

Solve

You are given an m x n integer array grid. There is a robot initially located at the top-left corner (i.e., grid[0][0]). The robot tries to move to the bottom-r...

MediumSometimes
arraydynamic-programmingmatrix

Same Tree

Solve

Given the roots of two binary trees p and q, write a function to check if they are the same or not.

EasySometimes
treedepth-first-searchbreadth-first-search

Jump Game II

Solve

You are given a 0-indexed array of integers nums of length n. You are initially positioned at index 0.

MediumSometimes
arraydynamic-programminggreedy

Binary Tree Right Side View

Solve

Given the root of a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.

MediumSometimes
treedepth-first-searchbreadth-first-search

Course Schedule III

Solve

There are n different online courses numbered from 1 to n. You are given an array courses where courses[i] = [durationi, lastDayi] indicate that the ith course...

HardSometimes
arraygreedysorting

Minimum Number of Arrows to Burst Balloons

Solve

There are some spherical balloons taped onto a flat wall that represents the XY-plane. The balloons are represented as a 2D integer array points where points[i]...

MediumSometimes
arraygreedysorting

Minimum Cost For Tickets

Solve

You have planned some train traveling one year in advance. The days of the year in which you will travel are given as an integer array days. Each day is an inte...

MediumSometimes
arraydynamic-programming

Filling Bookcase Shelves

Solve

You are given an array books where books[i] = [thicknessi, heighti] indicates the thickness and height of the ith book. You are also given an integer shelfWidth...

MediumSometimes
arraydynamic-programming

Car Pooling

Solve

There is a car with capacity empty seats. The vehicle only drives east (i.e., it cannot turn around and drive west).

MediumSometimes
arraysortingheap-priority-queue

Maximum Sum Circular Subarray

Solve

Given a circular integer array nums of length n, return the maximum possible sum of a non-empty subarray of nums.

MediumSometimes
arraydivide-and-conquerdynamic-programming

Daily Temperatures

Solve

Given an array of integers temperatures represents the daily temperatures, return an array answer such that answer[i] is the number of days you have to wait aft...

MediumSometimes
arraystackmonotonic-stack

Majority Element

Solve

Given an array nums of size n, return the majority element.

EasySometimes
arrayhash-tabledivide-and-conquer

Rotate Array

Solve

Given an integer array nums, rotate the array to the right by k steps, where k is non-negative.

MediumSometimes
arraymathtwo-pointers

Best Time to Buy and Sell Stock

Solve

You are given an array prices where prices[i] is the price of a given stock on the ith day.

EasySometimes
arraydynamic-programming

Kth Largest Element in an Array

Solve

Given an integer array nums and an integer k, return the kth largest element in the array.

MediumSometimes
arraydivide-and-conquersorting

Path Sum III

Solve

Given the root of a binary tree and an integer targetSum, return the number of paths where the sum of the values along the path equals targetSum.

MediumSometimes
treedepth-first-searchbinary-tree

Last Stone Weight

Solve

You are given an array of integers stones where stones[i] is the weight of the ith stone.

EasySometimes
arrayheap-priority-queue

Populating Next Right Pointers in Each Node

Solve

You are given a perfect binary tree where all leaves are on the same level, and every parent has two children. The binary tree has the following definition:

MediumSometimes
linked-listtreedepth-first-search

Minimum Area Rectangle

Solve

You are given an array of points in the X-Y plane points where points[i] = [xi, yi].

MediumSometimes
arrayhash-tablemath

Sliding Window Median

Solve

The median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two middl...

HardSometimes
arrayhash-tablesliding-window

Put Marbles in Bags

Solve

You have k bags. You are given a 0-indexed integer array weights where weights[i] is the weight of the ith marble. You are also given the integer k.

HardSometimes
arraygreedysorting

How often are these problems asked?

Frequency scores are based on crowdsourced interview reports. A higher score means the problem has been reported more often in recent Flipkart interviews.

Very Likely

75-100%

Likely

50-74%

Sometimes

25-49%

Rare

0-24%

Preparing for your Flipkart coding interview

Flipkart interviews focus heavily on array, dynamic-programming, hash-table problems. If you're short on time, these are the categories to prioritize. The problems on this page are sorted by frequency, so start from the top and work your way down.

Beyond solving problems, practice explaining your approach. Flipkart interviewers care about your thought process - how you break down a problem, consider edge cases, and evaluate tradeoffs between solutions. A clean O(n) solution you can explain clearly beats an O(log n) solution you can't articulate.

Looking for more companies? Browse all 458 companies in our directory, or sharpen your fundamentals with our free data structure visualizers and AI-powered DSA tutor.

Frequently Asked Questions

What coding problems does Flipkart ask in interviews?add

Flipkart has been reported to ask 99 distinct coding problems. The most common topics are array, dynamic-programming, hash-table. 10 are Easy difficulty, 57 are Medium, and 32 are Hard. Problems are sorted by frequency - the ones at the top are asked most often.

How hard are Flipkart coding interviews?add

Based on 99 reported problems, Flipkart interviews are significantly harder than average - 32% Hard vs 18% across all companies. 58% of questions are Medium difficulty. Focus on the high-frequency Medium problems first, then work through the Hard ones.

How should I prepare for a Flipkart coding interview?add

Start with the highest-frequency problems listed on this page. Focus on the core topics: array, dynamic-programming, hash-table. Practice solving them under time pressure and explaining your approach out loud. Mock interviews with AI can simulate the real experience.

Other companies to explore

Ready to ace your Flipkart interview?

Simulate a real Flipkart coding interview with an AI interviewer. Get a scorecard with specific feedback on your problem-solving, code quality, and communication.

Simulate a Flipkart interview with AIarrow_forward