Parking lot occupancy peaks from entry and exit events
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 answer yet. Write the first one; the best answer gets endorsed.
