Flipkart Interview Experience for SDE-I | 1 Year Experienced - GeeksforGeeks

20 Aug, 2021
Round 1:
Machine Coding – 30 mins discussion on problem statement, 3hrs to implement, another 1 – 1.5 hrs discussion on solution, with test cases.
Design Covid-19 Vaccination Booking System
Features include :
Onboarding states, districts, wards, vaccination centers, slots
Users registering themselves with unique documentation.
Proper Search functions to help user, find slots, centres, wards in city.
List bookings and center data.
The question was implementation heavy, we needed to make sure we take care of abrupt input and edge cases, and there were a lot of these cases coming up.
A similar kind of implementation-based question can be – https://workat.tech/machine-coding/practice/design-library-management-system-jgjrv8q8b136.
The inputs/commands were very similar to the one in the article.
Round 2(DSA): 45 Minutes
Given an array of positive and negative numbers. You have to find the maximum product of 3 numbershttps://practice.geeksforgeeks.org/problems/three-great-candidates0515/1.Input : [9, 1, 2, 3, 4, 5, -8, 10]
Output : 450 (10 * 9 * 5)
Input : [-9, 1, 2, 3, 4, 5, -8, 10]
Output : 720 (10 * -9 * -8)Solution:– Sort the array and the answer will be max(product of last 3 numbers OR product of first 2 numbers with last one)Time: O(n Log n)– Traverse the array and store the max 3 numbers and min 2 numbers in variables. Answer will be max(max1 * max2 * max3, max1 * min 1 * min2).Time: O(n)Given Flight Routes with a source, we need to find the destination. A destination is the airport which does not has a route to some other airport.There can me multiple airports which do not have a route to some other airport, but the destination airport should be reachable from the source.A destination airport will always exist.Input : [A,B] [B,C] [C,D] [E,F], Source = A
Output : D
A(source)->B->C->D
E->FNo route after D. F also does not have a route to another aiport, but F cannot be arrived from the source, so it cannot be the answer.Input : [A,B] [B,C] [C,D] [C,E] [E,D], Source = A
Output : D
A(source)-B-C  -  D
            \   /
              EThere is not route after D, so D will be the destination.Solution:Creating the graph, and then doing a DFS call from source till we find a node that has no children. That node will be the answer.Time – O(n), n is the number of airportsI used a hashmap to build the graph like adjacency list.There was discussion on other ways of building the graph that could be space optimised.Given a positive number N, generate the score for that number, where N can be represented as sum of 2 numbers A and B, and score is summation of all permutations of [Score(A) + Score(B)].A and B combined must be unique. (Ex : 1 & 3 is same as 3 & 1)Input : 3
Output : 3
Input : 5
Output : 14Solution:This is a 1D DP problem, where score of N can be calculated in a bottom up manner, by calculating the scores for the numbers less than N.Example :
1 => 1 (Base case)
2 : 1 + 1 => Score(1) + Score(1) = 2
3 : 1 + 2 => Score(1) + Score(2) = 3
4 : 1 + 3 => Score(1) + Score(3) = 4
2 + 2 => Score(2) + Score(2) = 4
= 4 + 4 = 8
5 : 1 + 4 => Score(1) + Score(4) = 9
 : 2 + 3 => Score(2) + Score(3) = 5
 = 9 + 5 = 14
6 : 1 + 5 => Score(1) + Score(5) = 15
 : 2 + 4 => Score(2) + Score(4) = 10
 : 3 + 3 => Score(3) + Score(3) = 6
 = 15 + 10 + 6 = 31>We just needed make a 1D array from 1 to N, and traverse from 1 filling the values and finally return Score(N).Time: O(n^2)
Given an array of positive and negative numbers. You have to find the maximum product of 3 numbershttps://practice.geeksforgeeks.org/problems/three-great-candidates0515/1.Input : [9, 1, 2, 3, 4, 5, -8, 10]
Output : 450 (10 * 9 * 5)
Input : [-9, 1, 2, 3, 4, 5, -8, 10]
Output : 720 (10 * -9 * -8)Solution:– Sort the array and the answer will be max(product of last 3 numbers OR product of first 2 numbers with last one)Time: O(n Log n)– Traverse the array and store the max 3 numbers and min 2 numbers in variables. Answer will be max(max1 * max2 * max3, max1 * min 1 * min2).Time: O(n)
Input : [9, 1, 2, 3, 4, 5, -8, 10]
Output : 450 (10 * 9 * 5)
Input : [-9, 1, 2, 3, 4, 5, -8, 10]
Output : 720 (10 * -9 * -8)
Solution:
– Sort the array and the answer will be max(product of last 3 numbers OR product of first 2 numbers with last one)
Time: O(n Log n)
– Traverse the array and store the max 3 numbers and min 2 numbers in variables. Answer will be max(max1 * max2 * max3, max1 * min 1 * min2).
Time: O(n)
Given Flight Routes with a source, we need to find the destination. A destination is the airport which does not has a route to some other airport.There can me multiple airports which do not have a route to some other airport, but the destination airport should be reachable from the source.A destination airport will always exist.Input : [A,B] [B,C] [C,D] [E,F], Source = A
Output : D
A(source)->B->C->D
E->FNo route after D. F also does not have a route to another aiport, but F cannot be arrived from the source, so it cannot be the answer.Input : [A,B] [B,C] [C,D] [C,E] [E,D], Source = A
Output : D
A(source)-B-C  -  D
            \   /
              EThere is not route after D, so D will be the destination.Solution:Creating the graph, and then doing a DFS call from source till we find a node that has no children. That node will be the answer.Time – O(n), n is the number of airportsI used a hashmap to build the graph like adjacency list.There was discussion on other ways of building the graph that could be space optimised.
There can me multiple airports which do not have a route to some other airport, but the destination airport should be reachable from the source.
A destination airport will always exist.
Input : [A,B] [B,C] [C,D] [E,F], Source = A
Output : D
A(source)->B->C->D
E->F
No route after D. F also does not have a route to another aiport, but F cannot be arrived from the source, so it cannot be the answer.
Input : [A,B] [B,C] [C,D] [C,E] [E,D], Source = A
Output : D
A(source)-B-C  -  D
            \   /
              E
There is not route after D, so D will be the destination.
Solution:
Creating the graph, and then doing a DFS call from source till we find a node that has no children. That node will be the answer.
Time – O(n), n is the number of airports
I used a hashmap to build the graph like adjacency list.
There was discussion on other ways of building the graph that could be space optimised.
Given a positive number N, generate the score for that number, where N can be represented as sum of 2 numbers A and B, and score is summation of all permutations of [Score(A) + Score(B)].A and B combined must be unique. (Ex : 1 & 3 is same as 3 & 1)Input : 3
Output : 3
Input : 5
Output : 14Solution:This is a 1D DP problem, where score of N can be calculated in a bottom up manner, by calculating the scores for the numbers less than N.Example :
1 => 1 (Base case)
2 : 1 + 1 => Score(1) + Score(1) = 2
3 : 1 + 2 => Score(1) + Score(2) = 3
4 : 1 + 3 => Score(1) + Score(3) = 4
2 + 2 => Score(2) + Score(2) = 4
= 4 + 4 = 8
5 : 1 + 4 => Score(1) + Score(4) = 9
 : 2 + 3 => Score(2) + Score(3) = 5
 = 9 + 5 = 14
6 : 1 + 5 => Score(1) + Score(5) = 15
 : 2 + 4 => Score(2) + Score(4) = 10
 : 3 + 3 => Score(3) + Score(3) = 6
 = 15 + 10 + 6 = 31>We just needed make a 1D array from 1 to N, and traverse from 1 filling the values and finally return Score(N).Time: O(n^2)
A and B combined must be unique. (Ex : 1 & 3 is same as 3 & 1)
Input : 3
Output : 3
Input : 5
Output : 14
Solution:
This is a 1D DP problem, where score of N can be calculated in a bottom up manner, by calculating the scores for the numbers less than N.
Example :
1 => 1 (Base case)
2 : 1 + 1 => Score(1) + Score(1) = 2
3 : 1 + 2 => Score(1) + Score(2) = 3
4 : 1 + 3 => Score(1) + Score(3) = 4
2 + 2 => Score(2) + Score(2) = 4
= 4 + 4 = 8
5 : 1 + 4 => Score(1) + Score(4) = 9
 : 2 + 3 => Score(2) + Score(3) = 5
 = 9 + 5 = 14
6 : 1 + 5 => Score(1) + Score(5) = 15
 : 2 + 4 => Score(2) + Score(4) = 10
 : 3 + 3 => Score(3) + Score(3) = 6
 = 15 + 10 + 6 = 31
>We just needed make a 1D array from 1 to N, and traverse from 1 filling the values and finally return Score(N).
Time: O(n^2)
Some people had 2 DSA rounds, but my round went pretty well, so they cut down 1 round for me.
Although the questions seemed on the easy-mediumish side, but with 45 mins in hand out of which 10 mins were spent in intro and basic projects/roles discussion, solving 3 questions in about 30 mins made it a bit difficult.
Round 3(Hiring Manager/Cultural Fitment): 1 Hour
Asked me about the roles in previous org.Explain a very high level architecture of the things I work on.Choice of language/framework and reasons.Choice of DB (SQL / NoSQL) and why. (Deep Discussion)Caching Concepts with deep Discussion.Discussion on Projects.Situation when I proved myself more towards customer oriented.Situation when I had disagreements with team and how did I handle.Situation when I went out of the way to do something.Greatest Achievement till now for me.How to handle a situation when customer requirements are misaligned with business demands.Steps you take to show up team work.
Asked me about the roles in previous org.
Explain a very high level architecture of the things I work on.
Choice of language/framework and reasons.
Choice of DB (SQL / NoSQL) and why. (Deep Discussion)
Caching Concepts with deep Discussion.
Discussion on Projects.
Situation when I proved myself more towards customer oriented.
Situation when I had disagreements with team and how did I handle.
Situation when I went out of the way to do something.
Greatest Achievement till now for me.
How to handle a situation when customer requirements are misaligned with business demands.
Steps you take to show up team work.
Verdict: Selected
Be consistent and have patience, things will work and you will land where you want.
Flipkart
Marketing
Experienced
Interview Experiences
Flipkart
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.
Comments
Old Comments
Amazon Interview Experience for SDE1 (8 Months Experienced) 2022
Infosys Interview Experience for Java Backend Developer (3-5 Years Experienced)
Paypal Interview Experience for SSE
Amazon Interview Experience for System Development Engineer (Exp - 6 months)
Walmart Interview Experience for SDE-III
Amazon Interview Questions
Microsoft Interview Experience for Internship (Via Engage)
Commonly Asked Java Programming Interview Questions | Set 2
Amazon Interview Experience for SDE-1 (On-Campus)
Amazon Interview Experience for SDE-1