Open In App

Flipkart Interview Experience for Software Engineer-2

Last Updated : 24 Mar, 2021
Improve
Improve
Like Article
Like
Save
Share
Report

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.
  6. Bonus question:

  7. 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)

Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads