You need array sorting skills and understanding of how to compare intervals by their start and end points. Most interval problems begin by sorting intervals, typically by start time (or sometimes by end time for greedy selection).
Drawing intervals on a number line helps visualize overlaps and gaps. Practice this visualization technique before coding. Understanding when two intervals overlap ( after sorting) is fundamental.