The problem, in one line. Given a sorted list of separate intervals and one new interval, return the list with the new one added, merging anything it touches. LeetCode 57.
The tell. The list is already sorted and already free of overlaps, so the new interval can only affect a single stretch in the middle. Everything before that stretch and everything after it is untouched.