Flipkart Interview Experience for SDE-1 (On-Campus)
Flipkart visited my college for the role of SDE1 in the month of October 2020. There were a total of 4 rounds.
Round 1(Online coding test-90 mins): A total of 3 questions were asked in this round-
- An extension to the Minimum Spanning tree problem. https://practice.geeksforgeeks.org/problems/minimum-spanning-tree/1
- Given a pattern string and a major string, find for the smallest substring in the major string which contains all the characters(including duplicates) of the pattern string. https://practice.geeksforgeeks.org/problems/smallest-window-in-a-string-containing-all-the-characters-of-another-string-1587115621/1
- A minimum number of Refueling stops. https://leetcode.com/problems/minimum-number-of-refueling-stops/
No restriction on the programming language. At least 2 questions are to be solved to clear this round.
Round 2(Technical Interview- 45mins): The interviewer was very friendly and cracking jokes right from the start. After the introduction of each other, he directly dived into the questions. Two questions were asked, we were expected to tell the approach ( they expect the most optimized solution, a less optimized is also partially accepted) and then write the code for the same.
The questions were:
- Sort array after converting elements to their squares.
- Given three sorted arrays(A, B, C), find the count of elements ai, bj, ck such that ai>bj>ck and ai, bj, ck belong to A, B, C respectively. Expected time complexity-O(n)
This can be solved using a three-pointer technique with one pointer in the center array(B) and searching for the other two elements in A and B. All the 2 questions are to be solved to clear this round.
Round 3(Technical interview- 45mins): The interviewer directly dived into the questions without any introduction. I was expected to write the code and run it on some sample test cases he gave and then explain the approach(if test cases pass).
Given a string and a breaking point b (0<=b<=n), the string will be broken into two parts at the breakpoint.
S=”walterwhite” , b=3, the two broken substrings are “walt” and “erwhite”. Now delete the minimum number of characters from both the substrings formed such that both become the same. Return the characters to be deleted.
In the above example- return [‘a’, ‘l’, ‘e’, ‘r’, ‘h’, ‘i’, ‘e’]-> a, l from walt and e,r,h,i,e from erwhite
Solution: It’s a very simple alteration to the Longest common subsequence problem. Find the LCS of both the substrings and return all characters which are not part of the LCS.
Find the minimum sum of the elements of the array which are not part of the Longest increasing subsequence(LIS).
Solution- It is a slight change in the LIS problem. Find the Longest Increasing subsequence, if there are more than one sub subsequences with the same longest length, return the maximum sum LIS. Now return sum(array)- LIS sum.
The LIS are – 1,2,3,4,9 and 0,1,2,3,9 but we need to return the maximum sum LIS so, 1+2+3+4+9=19
Solution: Along with the length of LIS which we store in the dp array(dp[i]= LIS of array[0:i+1]), also store dp2 which is the maximum sum of corresponding LIS.
Both the questions are to be solved to clear the round.
Round 4 (HR technical Resume based- 30mins): It was a Resume based round, the interviewer started with an introduction and then started to talk about my resume and asked about the projects. Asked some what-if questions related to my project(example-what if the input the user gives is not accurate, how is your model robust for such cases?). After the detailed discussion of my projects. The interviewer asked what feature would I like to add to the Flipkart app/website and how do you implement it?
And finally asked If I have any questions and the interview ended.
Finally, 5 people were given an FTE offer.
TIPS- All the questions asked were from data structures and algorithms. Be strong at your problem-solving skills and DSA knowledge. Be very clear about the projects you write in your resume.
Hey geek! It’s time to become a success story instead of reading them. Check out our most renowned DSA Self Paced Course, now at a student-friendly price and become industry ready. And if you are looking for a more complete interview preparation resource, check out Complete Interview Preparation Course that will prepare you for the SDE role of your dreams!
Feeling prepared enough for your interview? Test your skills with our Test Series that will help you prepare for top companies like Amazon, Microsoft, TCS, Wipro, Google and many more!