Insert interval

0
Remix

Given a list of non-overlapping intervals sorted by start and a new interval, insert the new one and merge wherever it overlaps, returning a sorted list of non-overlapping intervals. Do it in one pass.

AmazonCodingLast asked Sep 2025
No answer yet. Write the first one; the best answer gets endorsed.