Flipkart limited interview experience Real time questions & tips from candidates to crack your interview

SDE - Intern

Flipkart limited
upvote
share-icon
3 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 1 year
Topics: Data Structures, OOPS, System Design, OS, DBMS, Specially Mastered Dynamic Programming and Graphs
Tip
Tip

Tip 1 : Make sure you are good at DSA, Graphs, DP, Recursion and Backtracking.
Tip 2 : Also whatever projects you develop try to deploy those, and give interviewer some data about the audience you are getting.
Tip 3 : Be Confident about what you have written in your Resume.
Tip 4 : Treat an interview as a discussion with some person where you will get to learn something for sure.
Tip 5 : Try to prepare for HR round beforehand, atleast get some idea about like what kind of questions are asked

Application process
Where: Campus
Eligibility: above 6 CGPA
Resume Tip
Resume tip

Tip 1 : Try to include atleast 2 major(good) projects in you resume
Tip 2 : Don't put unecessary things on resume because if you fail to answer even a very minute thing which you have mentioned in your resume, then it will give very bad impression to interviewer

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 Minutes
Interview date6 Aug 2021
Coding problem3

It was an online round where we were given 3 DSA questions to solve, and we have to complete those in 90 mins.

1. Shortest Distance

Moderate
15m average time
85% success
0/80
Asked in companies
OptumDunzoFlipkart limited

Ninjaland is a country consisting of ‘N’ states and ‘M’ paths. There are two types of paths that connect any two states. One is the normal path, and the other is a special path. Both paths have their respective lengths. You can use either of the paths to travel between two states. Your task is to determine the shortest distance between the two given states such that at most, one(possibly zero) special path is included in this path.

Note:
1. All the paths are directed.

2. Multiple paths can be present between two states.

3. All the states are connected with each other.

4. It does not have any self-loop.

5. At least one path always exists between the two given states.
For Example:
If ‘N’ = 3, ‘M’ = 2, and given values of paths are 
[ [1, 2, 2, 3],
  [2, 3, 4, 2] ]
You have to calculate the shortest distance between ‘X’ = 1 and ‘Y’ = 3

diagram

In the diagram, we can observe no direct edge from state 1 to state, 3 but we can go from state 1 to state 2 using the normal path of length 2 and then from state 2 to state 3 using the special path of length 2. So the total length will be 4, and we can clearly see that no other path can be smaller than this. Hence, the answer is 4.
Try solving now

2. Modular Exponentiation

Easy
15m average time
85% success
0/40
Asked in companies
SamsungFlipkart limitedGoogle inc

You are given a three integers 'X', 'N', and 'M'. Your task is to find ('X' ^ 'N') % 'M'. A ^ B is defined as A raised to power B and A % C is the remainder when A is divided by C.

Try solving now

3. Chocolate Problem

Moderate
15m average time
85% success
0/80
Asked in companies
EcomExpressIBMMicrosoft

Given an array/list of integer numbers 'CHOCOLATES' of size 'N', where each value of the array/list represents the number of chocolates in the packet. There are ‘M’ number of students and the task is to distribute the chocolate to their students. Distribute chocolate in such a way that:

1. Each student gets at least one packet of chocolate.

2. The difference between the maximum number of chocolate in a packet and the minimum number of chocolate in a packet given to the students is minimum.

Example :

Given 'N' : 5 (number of packets) and 'M' : 3 (number of students)

subsequence

And chocolates in each packet is : {8, 11, 7, 15, 2}

All possible way to distribute 5 packets of chocolates among 3 students are -

( 8,15, 7 ) difference of maximum-minimum is ‘15 - 7’ = ‘8’
( 8, 15, 2 ) difference of maximum-minimum is ‘15 - 2’ = ‘13’ 
( 8, 15, 11 ) difference of maximum-minimum is ‘15 - 8’ = ‘7’
( 8, 7, 2 ) difference of maximum-minimum is ‘8 - 2’ = ‘6’
( 8, 7, 11 ) difference of maximum-minimum is ‘11 - 7’ = ‘4’
( 8, 2, 11 ) difference of maximum-minimum is ‘11 - 2’ = ‘9’
( 15, 7, 2 ) difference of maximum-minimum is ‘15 - 2’ = 13’
( 15, 7, 11 ) difference of maximum-minimum is ‘15 - 7’ = ‘8’
( 15, 2, 11 ) difference of maximum-minimum is ‘15 - 2’ = ‘13’
( 7, 2, 11 ) difference of maximum-minimum is ‘11 - 2’ = ‘9’

Hence there are 10 possible ways to distribute ‘5’ packets of chocolate among the ‘3’ students and difference of combination (8, 7, 11) is ‘maximum - minimum’ = ‘11 - 7’ = ‘4’ is minimum in all of the above.
Try solving now
02
Round
Medium
Face to Face
Duration45 Minutes
Interview date18 Aug 2021
Coding problem2

First Techincal round where we were asked 2 question based on DSA and we have to give proper optimised approach and also we have to write code

1. Reverse Alternate Nodes of a Singly Linked List

Moderate
0/80
Asked in companies
RupeekFlipkart limited

For a given Singly Linked List of integers, you are required to reverse alternate nodes and append them to the end of the list.

For Example:

The given linked list is 1->2->3->4 then after reversing the alternate nodes we will have 1->3->4->2. 

Assuming 0 based indexing, odd indexed nodes are the alternate nodes that is, in the given linked list the node with value 2 and the node with value 4 are the alternate nodes. 

List without alternate nodes:  1->3 
List with alternate nodes:  2->4 
Reversing the list with alternate nodes: 4->2

After appending the reversed alternate nodes at the end, the updated list will be 1->3->4->2. 
Try solving now

2. Smallest Number

Easy
15m average time
85% success
0/40
Asked in companies
OYOGoldman SachsMAQ Software

You are given two positive integers ‘N’ and ‘K’. Your task is to find the smallest ‘N’ digit number whose sum of digits equals ‘K’. If no such number exists then you need to print -1.

Try solving now
03
Round
Medium
Face to Face
Duration45 minutes
Interview date21 Aug 2021
Coding problem2

This round was similar to previous round where we were asked 2 questions little hard, and we have to write optimised approach in 45 mins

1. Asteroid Collision

Moderate
15m average time
85% success
0/80
Asked in companies
MicrosoftAmazonDunzo

You are given an array/list 'asteroids' representing asteroids in a row.


For each element of the given array, its absolute value denotes the size of that asteroid, and its sign denotes the direction it moves in(+ve meaning right and -ve meaning left).


An asteroid with a weight of 0 denotes a massless asteroid that moves in the right direction.


All asteroids are moving at the same speed. Whenever two asteroids collide, the smaller asteroid gets destroyed.


If both asteroids are the same size, then both asteroids get destroyed. Two asteroids moving in the same direction never collide.


You are supposed to find the state of the asteroids after all collisions.


Example :
Input: ‘asteroids’ = [3,-2,4]

Output: [3, 4]

Explanation: The first asteroid will destroy the second asteroid. Hence, after the collision, the state of the asteroids will be [3,4].
Note:
You don’t need to print anything. Just implement the given function.
Problem approach

Intuition

A row of asteroids is stable if no further collisions will occur. After adding a new asteroid to the right, some more collisions may happen before it becomes stable again, and all of those collisions (if they happen) must occur right to left. This is the perfect situation for using a stack.

Algorithm

Say we have our answer as a stack with rightmost asteroid top, and a new asteroid comes in. If new is moving right (new > 0), or if top is moving left (top < 0), no collision occurs.

Otherwise, if abs(new) < abs(top), then the new asteroid will blow up; if abs(new) == abs(top) then both asteroids will blow up; and if abs(new) > abs(top), then the top asteroid will blow up (and possibly more asteroids will, so we should continue checking.)

Try solving now

2. Box Stacking

Hard
25m average time
65% success
0/120
Asked in companies
Morgan StanleyDirectiJio Platforms Limited

You are given a set of ‘n’ types of rectangular 3-D boxes. The height, width, and length of each type of box are given by arrays, ‘height’, ‘width’, and ‘length’ respectively, each consisting of ‘n’ positive integers. The height, width, length of the i^th type box is given by ‘height[i]’, ‘width[i]’ and ‘length[i]’ respectively.

You need to create a stack of boxes that is as tall as possible using the given set of boxes.

Below are a few allowances:

You can only stack a box on top of another box if the dimensions of the 2-D base of the lower box ( both length and width ) are strictly larger than those of the 2-D base of the higher box. 

You can rotate a box so that any side functions as its base. It is also allowed to use multiple instances of the same type of box. This means, a single type of box when rotated, will generate multiple boxes with different dimensions, which may also be included in stack building.

Return the height of the highest possible stack so formed.

alt text

Note:
The height, Width, Length of the type of box will interchange after rotation.

No two boxes will have all three dimensions the same.

Don’t print anything, just return the height of the highest possible stack that can be formed.
Problem approach

dynamic programming using tabulation

1) Generate all 3 rotations of all boxes. The size of rotation array becomes 3 times the size of the original array. For simplicity, we consider width as always smaller than or equal to depth. 
2) Sort the above generated 3n boxes in decreasing order of base area.
3) After sorting the boxes, the problem is same as LIS with following optimal substructure property. 
MSH(i) = Maximum possible Stack Height with box i at top of stack 
MSH(i) = { Max ( MSH(j) ) + height(i) } where j < i and width(j) > width(i) and depth(j) > depth(i). 
If there is no such j then MSH(i) = height(i)
4) To get overall maximum height, we return max(MSH(i)) where 0 < i < n

Try solving now

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
SDE - Intern
1 rounds | 2 problems
Interviewed by Flipkart limited
1613 views
0 comments
0 upvotes
SDE - Intern
3 rounds | 5 problems
Interviewed by Flipkart limited
1628 views
0 comments
0 upvotes
SDE - Intern
4 rounds | 7 problems
Interviewed by Flipkart limited
2390 views
0 comments
0 upvotes
SDE - Intern
1 rounds | 2 problems
Interviewed by Flipkart limited
0 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Amazon
15606 views
4 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by Microsoft
15500 views
1 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Amazon
10216 views
2 comments
0 upvotes