Page 1 of 1

Write an efficient program that allows a user to input a schedule containing the arrival and departure time of trains in

Posted: Fri May 20, 2022 11:40 am
by answerhappygod
Write An Efficient Program That Allows A User To Input A Schedule Containing The Arrival And Departure Time Of Trains In 1
Write An Efficient Program That Allows A User To Input A Schedule Containing The Arrival And Departure Time Of Trains In 1 (37.63 KiB) Viewed 40 times
No built- in methods . Use your own, also provide the screenshot of the output. Thank you
Write an efficient program that allows a user to input a schedule containing the arrival and departure time of trains in a station (the input size should be defined by the user) and find the minimum number of platforms needed to avoid delay in any train's arrival. For example, Trains arrival = {2.00, 2.10,3.00, 3.20, 3.50, 5.00 ) Trains departure = {2.30, 3.40, 3.20, 4.30, 4.00, 5.20 The minimum platforms needed is 2 The train arrived at 2.00 on platform 1 The train arrived at 2.10 on platform 2 The train departed at 2.30 from platform 1 The train arrived at 3.00 on platform 1 The train departed at 3.20 from platform 1 The train arrived at 3.20 on platform 1 The train departed at 3.40 from platform 2 The train arrived at 3.50 on platform 2 The train departed at 4.00 from platform 2 The train departed at 4.30 from platform 1 The train arrived at 5.00 on platform 1 The train departed at 5.20 from platform 1