Problem 3829 · Medium

Design Ride Sharing System

Riders and drivers wait in arrival order; a match pairs the front of each queue and a cancellation removes a waiting rider.

Open the interactive visualisation