Saturday, May 8, 2021

Flipkart Interview Experience for SDE-1 - IITG, 2020

 

 Ayush Dalia | https://www.linkedin.com/in/ayushdalia/


  • Selection Process :

  1. Eligibility

  2. Coding Test

  3. Technical Rounds

  4. HR Interview


  • Eligibility: Open for circuital branches only(no cpi barrier).


  • Coding Test: There were 3 questions in total with a time limit of 90 minutes. The platform used by Flipkart was AMCAT.


  1. Given an array of cell values. You are given q queries wherein each query you are provided left, right position, and the value you should remove(x). So you should remove x from each cell value from left to right. If any particular cell value in the left to the right range is less than x already then you should remove whatever that is available i.e make the cell value at that location zero. Now after q queries return the cells whose values are zero.  (Simple brute force solution was working for the given constraints)

  2. We are given a city in the form of a N*M grid. Grid values can either be 0 representing a manual delivery system or 1 representing drone delivery system. Now we want to replace clusters of manual delivery systems with drone delivery systems but we want to preserve k clusters of manual delivery too. A cluster means a set of locations that are either horizontally or vertically adjacent to each other(not diagonal). So we need to write an algorithm to find the minimum number of locations in clusters of manual delivery systems that should be replaced with drone delivery systems.
    (a. Maintain a N*M visited matrix.
    b. Iterate over the N*M grid, for every 0 and unvisited grid value do a dfs to calculate the size of that cluster of 0s and store it in a container. In this way, we’ll have sizes of all the clusters of 0s.
    c. Now sort the size values container and sum the sizes from start leaving k larger sizes, that is our required answer.)

  3. Given the nodes which form the edges(node1 and node2) and the amount of data that can be transferred from the node1 to node2.You are also given the root node and the total number of nodes i.e. n. The number of edges is n-1. Find the maximum data that can be transferred from root.
    (a.  Construct a tree/graph from the given data.
    b.  The total data from root will be equal to the sum of data transferred through each edge originating from the root, the data through each such edge will be the minimum of the weight of the edge and the total data that can be transferred through the lower node which is calculated recursively.)  


I submitted the test in around 50 minutes with all test cases passing for every question. After the coding test, 19 people were shortlisted for interviews and I was one of them.


  • Technical Rounds: The interview process was of three rounds in total, 2 technical, and 1 HR. Both technical rounds consisted of live problem solving on a live coding platform, and the duration for both technical rounds was 45 minutes each. They only expected us to write the pseudo code or the algorithm behind the problem.


  1. Technical - 1: The interviewer just gave a brief intro about himself, then straight away presented the following problems,

  1. You’re given a stream of input integers such that a number is coming every second. You need to print the median at every nth second.
    (https://www.geeksforgeeks.org/median-of-stream-of-running-integers-using-stl/)

  2. Assume my lucky number is the one in which all adjacent digits have a difference of two. Find the total number of lucky numbers till 500, then he increased the bound to 10^6.

(I went with the brute force approach of creating all the lucky numbers).

After the first technical round, only 5-6 candidates were selected for the second round.


    B)  Technical - 2: Similar to the first round, the interviewer gave a brief intro about himself and straight away dived into problem-solving,


  1.  There is a 4 digit combination lock. You’re given a starting combination and the final required combination. There are some banned combination states such that once the lock reaches that combination, then the lock will be jammed. We need to calculate the minimum number of movements that are required to reach the final combination avoiding the banned combinations along the way.

  2.   Given the start and end time of some customers and the total number of rooms in the hotel, calculate the number of customers that will not be allocated a room.


After the second round, 2-3 candidates were selected for the HR round.

   

Tips :
1. Try to clarify as many edge cases/scenarios as possible before actually coding or structuring your answer.

2. Always discuss your approach with the interviewer before actually coding your answer.

3. Start with brute force, then try to improve your answer along the way.

4. Do not hesitate in asking for examples if you feel stuck somewhere.



  • HR Interview: This was more of a free-flowing conversation than the previous rounds. The interviewer started with some basic questions like introduction, etc, and then moved on to my resume. There was a proper discussion of about 15-20 minutes on one of my projects. Finally, the interviewer ended the interview with more basic questions on my interests, future plans, etc. The total duration was about 45 minutes.



After that, 2 candidates were selected by Flipkart in total from IITG.


No comments:

Post a Comment

Please do not enter any spam link in the comment box