Implement a parking lot with per-vehicle-type slots and per-minute costs.
Unlock detailed company stats for this questionUpgrade
You are given an array of (vehicleType, slots) pairs and another array of (vehicleType, costPerMin) pairs. Implement:
initialize(vector<pair<..>> slotsPerType, vector<pair<..>> costPerMinPerType)bool onEnter(string plateNumber)int onExit(string plateNumber), which returns the calculated cost, -1 otherwise
Include unit tests and end-to-end code.
Community answers
No answers contributed by the community yet.
Related questions
Design a parking lot system with multiple vehicle types and spot categories.Implement a multi-level parking lot with park, unpark and check functions.Related courses

Course

Course
Course
