← Questions
Parking lot occupancy peaks from entry and exit events
0
I was asked this
No reports yet. Sign in to say where you were asked it.
You get parking events [car_id, time, 'entry' | 'exit'], not necessarily in order.
- What is the largest number of cars that were in the lot at the same time?
- Return the time interval during which the lot held that many cars.
- The exit scanner is faulty and some exits were never recorded. Every car stays at most 2 hours, so a car with no exit is gone 2 hours after it entered. Answer part 2 again.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
