Skip to content
Related Articles

Related Articles

Improve Article

Flipkart Interview Experience for Software Engineer-2

  • Difficulty Level : Medium
  • Last Updated : 24 Mar, 2021

First Round(MC Round): Given 90 minutes.

Design a Vehicle Rental Service. 

Here’s the question:

Description:

Flipkart is starting a new vehicle rental service FlipCar. In this service, we will rent different kinds of vehicles such as cars and bikes.



Features:

  1. Rental service has multiple branches throughout the city. Assume one city for now.
  2. Each branch has a limited number of different kinds of vehicles.
  3. Each vehicle can be booked with a predefined price. For simplicity, assume fixed pricing.
  4. Each vehicle can be booked in multiples of 1-hour slots each. (For simplicity, assume slots of a single day)
  5. No past bookings should be allowed.

Requirements:

  1. Onboard a new branch with available vehicles
  2. Onboard new vehicle(s) of an existing type to a particular branch
  3. Rent a vehicle for a time slot and a vehicle type(the lowest price as the default choice extendable to any other strategy).
  4. Display available vehicles for a given branch sorted on price
  5. The vehicle will have to be dropped at the same branch where it was picked up.

    Bonus question:

  6. Dynamic pricing – demand vs supply. If 80% of cars in a particular branch are booked, increase the price by 10%.

Other Details:

  1. Use the in-memory store.
  2. Do not create any UI for the application.
  3. Write a driver class for demo purposes. Which will execute all the commands in one place in the code and test cases.
  4. Please prioritize code compilation, execution, and completion.
  5. Work on the expected output first and then add good-to-have features of your own.

Expectations:

  1. Make sure that you can execute your code and show that it is working.
  2. Make sure that the code is functionally correct.
  3. Work on the expected output first and then add good-to-have features of your own.
  4. Code should be modular and readable.
  5. Separation of concern should be addressed.
  6. Code should easily accommodate new requirements with minimal changes.
  7. Code should be easily testable.
  8. Input can be taken in your desired format[not necessary to follow the same grammar], but the API’s should remain as is(should contain all the input params)

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon. GoogleE-Litmus and Microsoft Test Serieses.

My Personal Notes arrow_drop_up
Recommended Articles
Page :