Problem 1094 · Medium

Car Pooling

Decide whether every passenger trip fits within the vehicle capacity as riders board and leave. The running load is updated at each stop.

Open the interactive visualisation