Railway Station Codevita 9 Solution

Railway Station TCS Codevita 9 Solution 2020

Problem Description

Given timetable of trains and their stoppage time at a Railway Station, discover least number of stages required. 

Note – 

In the event that Train A’s flight time is x and Train B’s appearance time is x, at that point we can’t oblige Train B on a similar stage as Train A. 

Limitations 

1 <= N <= 10^5 

0 <= a <= 86400 

0 < b <= 86400 

Number of stages > 0 

Information 

First line contains N signifying number of trains. 

Next N line contain 2 whole numbers, an and b, indicating the appearance time and stoppage season of train. 

Yield 

Single whole number indicating the base quantities of stages expected to oblige each train. 

Time Limit 

Models 

Model 1 

Information 

10 2 

5 10 

13 5 

Yield 

Clarification 

The soonest showing up train at time t = 5 will show up at platform# 1. Since it will remain there till t = 15, train showing up at time t = 10 will show up at platform# 2. Since it will withdraw at time t = 12, train showing up at time t = 13 will show up at platform# 2. 

Railroad Station

DOWNLOAD THE SOLUTION

Codevita Season 9 All Questions Solutions

Listed Here :

Leave a Comment

close
error: Content is protected !!
Free Udemy Courses and Hacking Resources Join Us on TelegramClick Here
+