|
|
back to board1. Sort it by endTime, if endTime equals another endTime then sort them by startTime. 2. Open one iteration from 2 to n, init just check that, is endTime<starTime, if so then ans++; 3. print ans; endTime and startTimes is one array with unchanged same index... Sorry for poor English
I don't think sorting by startTime is necessary. I think we should reverse-sort by startTime. |
|
|