Flipkart Interview Experience for Software Developer Intern

• Last Updated : 11 Sep, 2021

Round 1 (Coding Test): It was a 90 minutes long coding test on the platform of the aspiring mind (which was also used later for interviews) consisting of 3 coding questions with increasing difficulty.

• Question 1 (Basic string matching): We were given two Strings, ‘text’ and ‘name’, and we were required to count the number of instances of the string ‘name’ in ‘text’. Matching was required to be done with case insensitiveness. The length of the strings was not given, so I first tried a basic brute force that worked for all test cases. However, a more efficient solution is possible with rolling hash or KMP algorithms.

• Question 2 (Two Pointers): Given a list of numbers, merge adjacent elements to form the maximum length palindrome possible. The question was on similar grounds as the one given in the link. We just need to iterate from left and right simultaneously, and merge the smaller of the two with the next element.

• Question 3 (Advanced String Matching): Given a string “drawstring” and an array of strings “coupons”, we needed to find how many coupons match as a substring with the drawstring with a tolerance of ‘k’ characters. Also, there were few operations that could be done on the coupon strings to form a match including changing ‘a’ to ‘o’ , ‘t’ to ‘l’ and vice versa, and also delete any one character in the coupon string. I tried to use brute to generate strings with one deleted character and then used recursion to check for a match incorporating all the conditions. I was able to pass 20/21 test cases.

14 students were selected for interviews. I think that test cases were weighted and selections were made based on the total number of test cases based rather than the number of questions completely solved.

Round 2 (Technical Interview 1 DSA – 45 mins): After a brief introduction, he jumped directly to problem-solving questions.

• Question 1 (Prefix sum): This was just a warm-up question where I was just asked to find the sum of various subarrays in the given integer array. I answered it quickly with prefix sum, he seemed satisfied and did not ask to code. https://practice.geeksforgeeks.org/problems/maximum-prefix-sum-for-a-given-range0227/1

• Question 2 (Two pointers): Generic question of finding the largest container which can be formed using the vertical lines on the x-axis whose heights were defined in the given integer array. I was asked to write a function code for the same.

• Question 3 (Array Manipulation): Given two arrays, one with alphabets and other with indices of those alphabets. I needed to arrange the alphabets according to the corresponding index in-place (without using any extra space). I defined a loop invariant for only moving forward when the ith index is fixed using the swap function. Then, he extended the same question to repeat the same process ‘k’ times that too without any extra space. Basically, he wanted me to use some technique so that I can store multiple indices at the same location in the array. As the values of indices will remain in range 1 to n, I stored indices as 0*n+idx, 1*n+idx, 2*n+idx, and so on, and extracted them using %n operation. I was asked to write a pseudo code for the same.

The interviewer was very helpful and calm. He supported me throughout the interview and also gave some life advice in the end. Apart from the code, I was asked to explain the time complexity for all the questions.

8 students moved to the next round.

Round 3 (Technical Interview 2 DSA – 45 mins): Similar to the last interview, started with a brief introduction and then moved to problem-solving.

• Question 1 (Game strategy): Given an integer array, I was allowed to pick the element from either the left or the right in one move and required to maximize my sum in given ‘k’ moves. At first sight, It looked like a DP problem and I explained to him the solution defining the DP state based on three variables. The time complexity moved to O(n*n*k) and he asked me if I could do any better. On a closer look, the problem was a much simpler one where we just need to find the maximum sum of elements in a window of k elements which is either in the beginning or end or some part in the beginning and some in end. I was able to solve it with just the time complexity of O(k). I was asked to write the code.

• Question 2 (Palindrome pair in an array of words): The question was exactly the same as given in the link. I tried brute force for checking every pair but he wanted a better solution. After some struggle, I said to solve it using trie. He seemed satisfied but wanted to know the complete procedure. I tried to explain but struggled with a few parts where he helped me. Then, there was a detailed discussion on the time complexity for each of the steps. I was not asked to write the code for the question (maybe because of less time).

https://practice.geeksforgeeks.org/problems/palindrome-pairs/1/

The interviewer was again very helpful throughout the interview and forced me to think in particular directions. He wanted to know the details of whatever I was thinking.

5 students were selected for the last round.

Round 4 (Hiring Manager Interview scheduled for 30 mins but went on for 55 mins): This round was taken by a senior developer in Flipkart and was a mix of the HR round and the technical one. After a brief introduction, he asked me about my projects. He asked me to explain one of them in detail. Then, there were questions about challenges faced, shortcomings, problems in groups, and other similar ones.

He asked me about the subjects which have been covered in the college curriculum. I answered with DSA, DBMS, OOP and other basic sciences. He asked about topics covered in DBMS, to which I listed some common ones. Then, he asked me about the ACID properties of transactions in DBMS and how they were maintained.

He asked me about a favourite subject to which I replied DSA. Then, he asked me a kind of abstract question on the linked list. He wanted me to think of ways to optimise the search and insert operations in a sorted linked list. I came up with various approaches to the additional array with binary search, binary search tree. But he wanted me not to use as much additional memory as the linked list. So, I tried to devise a solution based on indexing (as in DBMS with help of B trees). Then, there was a long discussion on the same, and he gave various scenarios for me to work my solution. This went on for around 40 mins after which he said that he had no further questions.

At the end of all the rounds, the interviewer asked if I had any questions for him. This was followed by a healthy and warm discussion about the company for around 15 mins and I got to know various details about the functioning, several departments, work is done, and challenges faced by them.

After all the interviews, 4 students were offered an internship role, and I was one of them.

My Personal Notes arrow_drop_up