Flipkart SDE Intern Interview Experience

Kartik Bhatia
DemuxAcademy
Published in
4 min readAug 15, 2019

Round 1: Coding Test

3 questions, 1.5 hours on Hackerrank

Q1. Basic combinatorics problem. The question was something on the lines of: out of n men and m women, teams of 3 need to be selected. The answer was the number of ways to form teams such that each group had at least 1 woman. Expected time to solve: 2–5 mins.

Q2. Implementation problem on strings. 3 strings were given: text, prefix and suffix. Print out the lexicographically smallest string with the maximum length starting with the longest substring in the prefix string and ending with the longest substring in the suffix string. Knowledge of STL and string functions like substr and find needed. Expected time to solve: 30–45 mins due to the question statement being confusing.

Q3. Good implementation problem on DSU. Pairs of people are given united by some candy. Suppose a and b like candy 1, b and c like candy 1, e and f like candy 1 and j and k like candy 2. 3 groups are formed, on the basis of candy and overlapping. Group 1: a,b,c for candy 1. Group 2: e,f for candy 1. Group 3: j,k for candy 2. Print out the maximum product of any two elements in the largest group. The largest group, in this case, is Group 1 so the answer would be maximum of (axb, bxc, axc) or in other words, the product of the two maximum elements of that group. Expected time to solve: 30–45 minutes.

The cutoff to clear this round was about 2.5 problems and 24 people were shortlisted for interviews.

Round 2: Technical Interview 1 (DS/PS Round)

Candidates were called in order of their ranking in the coding round. Relatively easier questions were asked to the first batch.

After a basic introduction, the interviewer moved straight to the questions.

Q1. Merge overlapping intervals. I don’t think anything needs to be said about this very standard problem. I was asked to write the pseudo code and mention the space and time complexities.

Q2. Snakes & Ladders. Again, standard BFS problem. Given a nxn grid with some snakes and ladders, print out the minimum number of dice rolls required to reach the finish. Pseudo code required with space and time complexities.

I was one of the few who were only asked two problems in this round. Most of the people were asked three.

8 students were shortlisted for the final interview.

Round 3: Technical Interview 2 (DS/PS Round)

Turned out to be the most challenging and interesting round out of all the interviews I had given.

Q1. Given a binary tree, remove all the nodes which have only 1 child, so that only leaf nodes and ‘full’ nodes remain. Gave a clean, recursive solution with pseudo code in under 15 mins.

Q2. Consider an old Nokia style T9 keyboard, with button 2 having abc, 3 having def and so on. Implement a predictive typing feature where the user presses a sequence of digits and the system should give a list of all possible words defined in a given dictionary of using that sequence. Example, let the user sequence be 2255. The system should output all words such as ball, call etc. (Each digits contributes to a character, i.e don’t worry about 2 quick presses giving the second character).

The dictionary had already been defined and consider a function is available which gives out whether a string is a present in the dictionary or not. The question was intentionally left open-ended as to make the candidate think of all possible solutions. Initially I thought of checking all possible strings which could be formed from the sequence. Would’ve been an O(3ⁿ) solution where n was the length of the sequence.

The interviewer then helped me through to think of it as a trie. Communication was the key as I wasn’t very experienced with tries. But I still managed to collect his hints and worked through the rest of the solution by myself and defined a preprocessing and search function. He was really satisfied with the approach and went to the next problem. Wrote the pseudo code for the preprocessing function.

Q3. Given an array of digits with all digits repeating twice except one digit, print that digit. Again, standard xor problem. More challenging was the follow-up question where all digits repeated thrice. Gave him a bitset approach and he was again satisfied.

Finally, results were announced after 30 minutes and I was one of the 6 people selected.

Demux Bootcamp really helped me brush up all DSA concepts and fill in all the conceptual doubts. Regular practice and belief even after being rejected from 2 interviews was the deciding factor I believe. I hope this helps all the future candidates!

--

--