lastMaxEndTime = CurrentEvent EndTime
if NextEvent exists {
if (lastMaxEndTime > NextEvent StartTime) {
overlappingMode = true;
overlappingEvents.add(currentEvent);
lastMaxEndTime = max(lastMaxEndTime, NextEvent EndTime)
}
else {
if (overlappingMode is TRUE) {
redrawOverlappingEvents(overlappingEvents);
overlappingMode = false;
EMPTY overlappingEvents;
}
lastMaxEndTime = NextEvent EndTime
}
}
4
03:30 1
13:01 2
12:00 1
09:11 2
05:10 2 // Test