• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests
April 21, 2022 |4.2K Views
Minimum Platforms | SDE Sheet |Arrays
  Share  3 Likes
Description
Discussion

In this video we will see how, when given the arrival and departure times of all trains that reach a railway station, the task is to find the minimum number of platforms required for the railway station so that no train waits. We are given two arrays that represent the arrival and departure times of trains that stop. Example: Input: arr[] = {9:00, 9:40, 9:50, 11:00, 15:00, 18:00} dep[] = {9:10, 12:00, 11:20, 11:30, 19:00, 20:00} Output: 3 Explanation: There are at-most three trains at a time (time between 9:40 to 12:00) Check out the video to see how we implement this!! Practice Problem: https://practice.geeksforgeeks.org/problems/minimum-platforms-1587115620/1 Article: https://www.geeksforgeeks.org/minimum-number-platforms-required-railwaybus-station/ SDE Sheet: https://www.geeksforgeeks.org/sde-sheet-a-complete-guide-for-sde-preparation/

Read More