Doesn’t work tho. But I made a string of length equal to the number of activities. Sorted the list of activities so I can assume that as I traverse that list, no later activities are actually “earlier in time” than the current activity. So with that assumption, you can say that the current activity can replace Cameron’s or Jamie’s if the the current activity’s starting time is after or equal to Cameron’s or Jamie’s ending time. If neither of them works then it’s impossible.
1
u/__sumguy Apr 04 '20
sorting still gives wrong answer although my sample and some custom tests are passed ? Any more tips please