Coding
Merge a New Interval
Merge a new interval into a list of non-overlapping intervals.
Input: intervals = [[1,2],[3,5],[6,7],[8,10],[12,16]], newInterval = [4,8]
Output: [[1,2],[3,10],[12,16]]
Explanation: The new interval overlaps with [3,5], [6,7], and [8,10], merging them all into the unified block [3,10].
Was asked at