Loading page…
A ride-hailing app's matching service must give a free driver the request that has waited longest. That is a queue: values are added at the back and removed from the front, so the first value in is the first out. The lecture shows a queue on a ring buffer and on a linked list, how the head and tail wrap round, how a full ring grows, the deque at both ends, the monotonic deque for a window's maximum, every operation with its cost, and the classic mistakes.
You are building the matching service of a ride hailing app.