Flipkart | SDE-1 | Offer
Anonymous User
2351

Experience: 1+ years.
Application process: Recruiter contacted me for the SDE-1 vacancy.
Interview process:
Round1- Machine Coding (90 mins)
Round2- DSA (1 hr)
Round3- Hiring Manager (45 mins)

Round1:
Machine Coding

Problem statement
You have been given a list of trips which the driver and passenger have completed. At the end
of the trip, the driver has given a rating to the passenger and the passenger has given a rating
to the driver as well. Ratings can be 1 to 5. With 5 being a good rating and 1 being bad rating.

  1. Given a passenger name and available drivers based on the historical trips you need to
    find the eligible cabs for the passenger. Here are the rules for choosing the eligible cabs
    a. The average rating received by the cab driver (from passengers) should be equal
    or higher than the average rating received by the passenger (from drivers). If a
    new passenger is trying to book a cab, consider their rating as 0.
    b. If there are no matching drivers available for the criteria #1, then you may
    consider drivers with whom the passenger has rode before but given them rating
    of more than 1.
  2. Given a driver location and a passenger location, sort the eligible drivers (from 1st point)
    based on their proximity to the passenger or rating
    Expected Output:
    Given a passenger name
  3. Print average rating of the passenger
  4. Print eligible driver names sorted by the average rating
  5. Print eligible driver names sorted by the euclidean distance √ ((x2 − x1)^2 + (y2 − y1)^2)
    Bonus question:
  6. Each driver goes through a registration, where a cab type is assigned to them -
    Hatchback, Sedan, SUV. Passengers can choose a preferred cab type and the
    application should respect the preference.
  7. Calculate fare for the trip based on cab type, distance (take as input) (distance *
    fare_per_type)
    Sample history ride data
    Driver's name
    Driver's rating
    passenger's
    (from passenger) name
    passenger’s rating
    (from driver)
    d1 4 c1 5
    d1 5 c2 4
    d1 1 c3 2
    d2 5 c1 1
    d2 5 c2 5d2 4 c3 5
    d3 3 c1 2
    d3 4 c2 5
    d3 3 c3 3
    Sample Input:
    Available Drivers:
    (name, x ,y)
    d1, 1, 0
    d2, 2, 0
    d3, 3, 0
    d4, 4, 0
    Passenger:
    (name, x, y)
    c2, 1, 0
    Sample Output
    Average Rating: 4.67
    Eligible Drivers:
    D2, 4.67
    Eligible Drivers by distance:
    D2
    Expectations
  8. Code should be demo-able (very important), either by using a main driver program or
    test cases.
  9. Create the sample data yourself. You can put it into a file, test case or main driver
    program itself. Don’t waste time if you’re having trouble reading data from a file,
    hard code it in the driver/main program.
  10. Prioritize functional correctness and completeness, with proper corner case handling.
  11. Code should be readable, modular, testable, extensible with proper naming conventions.
    It should be easy to add/remove functionality without rewriting the entire codebase.
  12. Avoid writing monolithic code.
  13. Code should handle edge cases properly and fail gracefully.
  14. Don’t use any database, store all the data in memory.
    Guidelines
  15. Input can be read from file or can be hard coded/used.
  16. Please do not access internet for anything EXCEPT syntax
  17. You are free to use the language of your choice.
    Initial 15 mins were given for understanding of question, and discuss any doubts.
    Post that, 90 mins were given for implementation.

Tips to clear this round:

  1. First focus on the functionality.
  2. Once your code is working, only then work on making it extensible/modular.
    After some time I was informed by the recruiter that I have cleared the round.

Round 2:
DS Algo/Problem Solving

I was asked 5 coding questions

  1. Find LCA of Binary tree ( There was some problem statement where we had to identify that we need to find LCA)
  • I was asked to do a dry run of the code.
  • I was asked to write the stack trace of the recursive function
  1. Print array elements that occur multiple no. of times.
  • Elements were in the range of 0,n-1
  • It was required to implement in O(1) space
  1. Find LCA of BST
  2. Find cube-root of a number (Solved using binary search)
  3. Print inorder traversal of binary tree without stack and recursion
  • Hint: Threaded Binary trees can be used.
    Tips to clear this round:
  1. Think out loud while solving question
  2. You should know how to analyze time and space complexity.
  3. Discuss about various approaches with interviewer
    Round 3:
    Hiring Manager round

A lot of scenario based questions were asked in this round.

  1. Strengths.
  2. Areas of improvements.
  3. Entire SDLC lifecycle.
  • Who are the stakeholders involved.
  • Who makes design decisions.
  • How feature decisions are made.
  1. What are the feedbacks received from manager
  2. Since you are working virtually, what challenges did you face and how did you overcome them.
  3. What improvements do you see in yourself.
  4. How will you ensure that code is completed on time if deadlines are strict.
  5. Why looking for a job change
  6. What is the motivation for you to do your work
  7. Working hours
  8. Team size
  9. Would you be comfortable to work from office.
    Tips to clear this round:

Do not take this round lightly.
Dedicate some amount of time for this round.
Frame your answers
Be confident
After 2 days, I was informed that I was selected.

Also, before this I had faced a lot of rejections from:
Amazon, Goldman Sachs, Sharechat to name a few :).

You just need one offer:)
Good luck! Keep hustling!

Comments (5)