How to check for overlapping intervals

Understanding intervals, their overlaps, and how to write effective conditions for interval-based problems