Concept Flow - Non Overlapping Intervals Minimum Removal
Sort intervals by end time
Initialize count = 0, prev_end = -∞
For each interval
Check if current start >= prev_end?
No→Remove interval, count += 1
Skip removal
Update prev_end = current end
Repeat
Return count
Sort intervals by their end time, then iterate to count how many intervals must be removed to avoid overlaps.
