Minimum Number of Trains that will be postponed

Revision en1, by ankitchou, 2016-09-23 10:33:33

Suppose there is only one platform and N number of trains. So at any point of time only 1 train will stay in platform. N time intervals (arrival and departure) are given which represent the timing duration of N trains.You have to find what is minimum number of trains that have to be postponed such that no collision take place.

Any ideas how to do this one? DP? Any help is appreciated!

Tags dp, minimize, train

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English ankitchou 2016-09-23 10:33:33 437 Initial revision (published)