How do you determine whether two people can attend the same meeting, and what is the edge case that catches people out?
Two intervals overlap when each one starts before the other one ends. Written as start of the first less than end of the second and start of the second less than end of the first. The condition has to be written as two strict inequalities rather than one inclusive comparison, and the reason is the edge case.
Consider a meeting from ten to eleven and another from eleven to twelve. They do not clash, because one ends exactly when the other begins. With inclusive comparisons you would call that an overlap and reject a schedule that is actually fine. With strict comparisons the two conditions are eleven less than eleven, which is false, so the intervals are correctly reported as compatible.
The mechanism is the half open interval convention, treating every interval as start inclusive and end exclusive. That mirrors how time actually behaves in a calendar: a booking that ends at eleven hands the room over at eleven, and the next booking starts at that same instant. Under that convention, two intervals conflict exactly when they share a positive amount of time.
The trade-off to name is that the strict version breaks if the problem defines a meeting as inclusive of its end time, so the convention should be stated before the code is written. In a scheduling system the same logic decides whether two jobs can use one machine, and it is the same function. When you have many bookings rather than two, sorting them by start time and comparing each one against the previous is the standard extension, and it costs O of n log n to sort plus a linear scan.