- Problem Description
Given schedule of trains and their stoppage time at a Railway Station, find minimum number of platforms needed
Note
If Train As departure time is x and Train B's arrival time is x, then we can't accommodate Train B on the same platf
- Constraints
1 <N< 1015
Ona < 86400
0<b< 86400
Number of platforms > 0
Input
7
First line contains N denoting number of trains.
Next Nline contain 2 integers, a and b, denoting the arrival time and stoppage time of train.
Output
Single integer denoting the minimum numbers of platforms needed to accommodate every train.
Time Limit
Answers
Answered by
0
Explanation:
The earliest arriving train at time t = 5 will arrive at platform# 1. Since it will stay there till t = 15, train arriving at time t = 10 will arrive at platform# 2. Since it will depart at time t = 12, train arriving at time t = 13 will arrive at platform
hope my answer helps you Mark the answer as brainliest............
Similar questions