A tie at time three.
transcript
Two windows. One to three, and three to five. Count how many run together. The answer looks like two. Do they overlap?
Each window makes two events. An event is a time and a change. Plus one at the start. Minus one at the end. Sort them by time, and sweep. A running count tracks the windows. Keep the highest count seen.
Both windows touch time three. The first ends there. The second starts there. Both events have the same time. Which event comes first?
Start first, and the count reaches two. The windows never run together. The first one is over at time three. The answer two is wrong. End first, and the count stays at one. That is the right answer.
A half-open window excludes its end time. So at the end time it is already over. The end must come first. Sort by time, then end before start.
Sort the end first. Full breakdown in the lecture.