6

Minimum Platforms | SDE Sheet |Arrays - Videos | GeeksforGeeks

 2 years ago
source link: https://www.geeksforgeeks.org/videos/minimum-platforms-f9qfl2/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Minimum Platforms
Minimum Platforms | SDE Sheet |Arrays
Hi. In this video, we will learn how
Loaded: 0.68%
00:01
Remaining Time -14:40
  • 120 Views
  • 21/04/2022

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/


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK