Problem 2153 · Medium

The Number of Passengers in Each Bus II

SQL walkthrough with invented sample tables. Buses run in time order, each takes the waiting passengers up to its capacity, and the rest wait for later buses.

Open the interactive visualisation