Minimum Fleet Size with Departure and Arrival Stations

You are given n bus trips. Each trip contains:

(departure_time, departure_station, arrival_time, arrival_station)

After completing one trip, a bus can operate another trip only if both condition...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: