If you were writing code, I would argue against using De Morgan's laws just because you can.
You're saving a few characters to make the code less obvious. Please correct me if there's some other benefit.
You're saving a few characters to make the code less obvious. Please correct me if there's some other benefit.
If two appointments conflict, that means that there is a time when they are both active. Thus each of their end times are after both of their start times. Of course, each appointment ends after it started, so that just leaves that each appointment ends after the other started. So if the appointments are a to b and c to d, then they conflict iff b > c and d > a.
(I've corrected bumbledraven's mistake of a > d vs. d > a.)