Open In App

Flipkart Interview Experience for SDE-1

Flipkart Interview Experience (Flipkart Grid 3.0 for SDE 1 intern+FTE)

Flipkart Interview experience off-campus through Flipkart Grid 3.0. Flipkart Grid 3.0 is a team hackathon contest However Our Team didn’t qualify for the ideation round, but we got a coding round test link.



Round 1: Coding Round

There were 3 questions



  1. A state consists of n cities. All roads in the city are bidirectional. We have to find the length of the shortest route between two given cities, with a twist that you can eliminate the distance between any “k” connected cities (eliminate a distance means you can make the distance between two connected cities as 0, you can do this “k” times).
  2. Advanced String matching question.
  3. Coin exchange problem (link to the problem)

I solved 2 questions (first and third)

Round 2:  Technical (No. of Interviewer – 1)

I gave 3 solutions

Approach 1: Time complexity: O(nlogn) Space complexity: O(1)
Approach 2: Time complexity: O(n) Space complexity: O(n)
Approach 3: Time complexity: O(n) Space complexity: O(1)
I gave 2 solutions

Approach 1, Time Complexity O(n), Space Complexity: O(n)
Approach 2, Time Complexity O(n), Space Complexity: O(1)

In the end, the interviewer told me that he is passing me in this round and gave me open feedback so that I perform better in Round 2. I got the link for Round 2 the same day only with 2 hours gap in between.

Round 3: Technical (No. of Interviewers 2)

Shuffle(): which would shuffle an array in random order

reset(): which would return the original array

My Solution:




class array_operations{
   vector<int> arr;
   vector<int> helper;
    
   public:
   array_operations(vector<int> nums){ 
       for(auto x : nums)
           arr.push_back(x);
    }
    
    vector<int> shuffle()
    {
         int n = arr.size();
        helper.clear();
        for(int i =0 ; i< n; i++)
        {
          int r = rand();
          R = r % (n);
          swap(arr[i], arr[r]);
          helper.push_back(r);
        }
  
        return arr; 
    }
  
    vector<int>  reset()
    {
         for(int i = n-1; i>=0; i--)
               swap(arr[i], arr[helper[i]]);
           return arr; 
    }
  
}
  
  
  
int main(){
  
   vector<int> array = {1,2,3,4,5,6,7,8,9};
   Array_operations a(array);
   Array = a.shuffle();
   Array = a.reset();
}

In the end, they asked about the time complexity of every method and function along with space complexity.

Round 3: HM round (No. of Interviewer – 1)

Now normal resume-based, regarding projects and hobbies.

I’m happy to share that I got the offer.

Tips: 


Article Tags :