...
/Solution: Find Minimum Number of Platforms Required for a Train Station
Solution: Find Minimum Number of Platforms Required for a Train Station
This review provides a detailed analysis of the solutions to find the number of platforms required for a train station.
We'll cover the following...
We'll cover the following...
Solution #1: Brute Force
The problem is to find the maximum number of trains that are there on the given railway station at a time. An Iterative solution would be to take every interval one by one and find the number of intervals that overlap with it. Keep track of the maximum number of intervals that overlap with an interval and then return the maximum value.
Time Complexity
Since this algorithm moves iteratively, the time complexity will be ...