Challenge: Find the Minimum Platforms Required For a Station

Given arrival and departure times of trains, calculate the number of platforms required for a train station.

Problem statement

Implement a function that returns the minimum number of platforms that are required for the train so that none of them waits.

Input

Two lists which represent arrival and departure times of trains that stop

Output

Minimum number of platforms required

Sample input

Arrival Time Departure Time
9:00 9:10
9:40 12:00
9:50 11:20
11:00 11:30
15:00 19:00
18:00 20:00
arrival= [900, 940, 950, 1100, 1500, 1800]
departure = [910, 1200, 1120, 1130, 1900, 2000]

Sample output

result = 3

Level up your interview prep. Join Educative to access 80+ hands-on prep courses.