Message on Whatsapp 8879355057 for DSA(OA + Interview) + Fullstack Dev Training + 1-1 Personalized Mentoring to get 10+LPA Job
0 like 0 dislike
799 views
in Online Assessments by Expert (46,090 points) | 799 views

1 Answer

0 like 0 dislike
Company - Flipkart
Round - 1, Machine Coding

Requirement -

This rental system will have some stations where cars will be parked.
Every station will have some cars (SUV, Hatchback, Bike, Sedan, etc.) and will have some fixed prices for each type of car ($11/hour for SUV, 12$/per hour for Sedan, etc.)
User can book a car from any station and drop at same or any other station
When a user searches for a car - list all stations with that type of available car + station with the lowest price should be on top followed by second cheapest and so on..(order by increasing per hour price)
When two stations have the same price, list the station nearest to the customer
Supported operations

 

Onboard station - (station_name, List
Search Vehicle
Book vehicle
Drop vehicle
Station Report - available car of each type, booked car of each type, etc.
by Expert (46,090 points)