Related Articles

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

• Difficulty Level : Medium
• Last Updated : 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

1. Given an array of positive and negative numbers. You have to find the maximum product of 3 numbers
https://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)

2. 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->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.

3. 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 : 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

2. Explain a very high level architecture of the things I work on.
3. Choice of language/framework and reasons.
4. Choice of DB (SQL / NoSQL) and why. (Deep Discussion)
5. Caching Concepts with deep Discussion.
6. Discussion on Projects.
7. Situation when I proved myself more towards customer oriented.
8. Situation when I had disagreements with team and how did I handle.
9. Situation when I went out of the way to do something.
10. Greatest Achievement till now for me.
11. How to handle a situation when customer requirements are misaligned with business demands.
12. 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.

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon. GoogleE-Litmus and Microsoft Test Serieses.

My Personal Notes arrow_drop_up