Tip 1 : Flipkart has a round called Machine Coding which is slightly different from test of the companies. This is mostly the 1st round so specially prepare for this round few days beforehand.
Tip 2 : Practice Algorithms and Data structures and Try to reach to the optimised solution as they expect a clean bug-free code in their DS round.
Tip 1 : Have metrics in your resume. E.g. explain what problem you solved and how it improved the efficiency/ reduced the manual hours/ saved time etc in numbers.
Tip 2 : Keep your resume in line with the job requirements. Don't add irrelevant information which doesn't really matter for SDE role.
The first round started around 10 in the morning and got wrapped up around 12 p.m I was given a question to solve and then had a discussion with the interviewer around the same.
Time to solve question: 1.5 hr
Discussion: 30 mins
Design Covid-19 Vaccination Booking System
Include features like:
Onboarding states, districts, wards, vaccination centres, slots
1. Users registration
2. Search functionality for finding centres in a city and then slots within a centre
3. Onboarding new states, cities, centres and slots.
Tip 1 : Go through a sample of machine coding rounds available on internet and try practicing then on your own within 1.5 hour time limit.
Tip 2 : Make sure you use OOP concepts like inheritance, polymorphism and proper class definition wherever possible as its counted a plus that you have a strong hold on OOP concepts and their implementation in real world scenario.
There were 2 DSA based questions andI had to write a clean code without any compiler.



I figured out that this is a variation of a graph problem where we have to count no. Of connected components in an undirected graph.
I solved it using DFS i.e. Depth first search algorithm for graphs.
1. Create another 2D matrix to keep track of nodes are visited say visited[ ][ ]
2. Then perform DFS on the entire input matrix. Check every unvisited node and check all its adjacent vertices (8 in total).
3. Keep on updating the visited[ ][ ] matrix as you visit a node.
4. Finally the no. Of calls made to the DFS() method will be the count of no. Of islands.
Interviewer seemed convinced with my approach and code



n = 5, k = 2 and arr[] = {6, 5, 4, 8, 7}
The array elements in sorted order are [4, 5, 6, 7, 8]. The ‘2-nd’ smallest element in the array is 5, so the answer is 5.
1. Don’t print anything. Return the value of ‘k-th’ smallest element.
2. ‘k’ is a positive integer and not greater than the size of the array.
3. The array ‘arr’ is unsorted, and all the elements of the array are distinct.
Approach 1 Basic:
I sorted the array and returned (k-1)th element. Time complexity: O(nlogn).
I knew that this is a very basic approach and I will have to optimise it.
Approach 2:
I thought that I need not sort the entire array because I just need to know the correct order of k elements. So after a few discussions with interviewer, I came up with the Heap data structure.
1. Created a min heap from the input array
2. Heap keeps the smallest element at its top.
3. Keep on removing the first k-1 elements, and when I reached the kth element, returned that as the answer.
It was a Hiring manager round. The discussion was mainly around my previous organisation and the projects I did.
1. There were questions around what my organization and team does. What were the challenging projects I was a part of and how I handled those challenges.
2. They asked why I want to switch to Flipkart and what are my expectations?
3. What are my strengths and some areas of improvements (weaknesses)?
Tip1 : Always be prepared with an honestly answer of why you're looking for a change and in this company particularly. If you're impressed by the scale at which they work or the new projects they're working on, honestly mention that.
Tip 2 : Never lie on your resume about your skills and projects. There'll be detailed discussion around those.



1. If the list is empty, the function immediately returns None because there is no middle node to find.
2. If the list has only one node, then the only node in the list is trivially the middle node, and the function returns that node.
I used the concept of 2 pointers to solve this.
1. Initialise both the pointers to start.
2. Move one pointer by 1 step and the other pointer 2 step at a time.
3. When the faster pointer reaches end of the linked list, then slower pointer would have reached the middle. Return that.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?