Given the arrival time, departure time and direction of trains, find the minimum number of platforms needed in each direction to accommodate all trains such that no train has to wait.
Sample Output:
2 platforms are needed in Up direction.
1 platform is needed in Down direction.
Arrival time | Departure time | Direction |
---|---|---|
11:00 | 11:15 | Up |
11:05 | 11:20 | Up |
11:00 | 11:10 | Down |
11:15 | 11:25 | Down |
Sample Output:
2 platforms are needed in Up direction.
1 platform is needed in Down direction.
thank u for sharing this post Switching Solutions services
ReplyDeleteSwitching Solutions companies
thank u for sharing this post Switching Solutions services
ReplyDeleteSwitching Solutions companies