Problem 1109 · Medium

Corporate Flight Bookings

Compute the reserved seats on every flight from a list of booking ranges. A difference array adds and subtracts at range boundaries before a running sum turns them into totals.

Open the interactive visualisation