Design a Car Rental Booking System

Medium · Low-Level Design · about 45 minutes

Asked at Uber, Amazon.

Design the booking core of a car rental service. A fleet has cars of several types. Customers ask which cars are free for a date range and reserve one; requests arrive as a stream. The allocation rule must be swappable: first fit, or the car that leaves the smallest gap between bookings (minimum wastage). Customers can cancel.

Related guides