You are an event organizer at a university, and n
companies would like to do a
presentation about their company at your university on Career Day. However, each company
have a tight schedule as to when they can come and present and how long they will present.
For the i
th company, starting from 0
, they can present starting from minute starts[i]
and
they can present for durations[i]
minutes. To give every student a chance to listen to every
presentation, the University can allow only one company to present at a time. You would like
to host as many presentations as possible, so given each company's schedule, find the maximum
number of presentations that the university can hold.
This is a companion discussion topic for the original entry at https://algo.monster/problems/twitter_oa_university_career_fair/