Skip to main content
Insert Interval | AlgoCracked
AlgoCracked
ProblemsInsert Interval
Medium38.0% acceptance
Array

Insert Interval

You are given a list of non-overlapping intervals sorted by start value, and a newInterval to add. Insert it and merge as needed so the result stays non-overlapping and sorted by start . Input format Input is [intervals, newInterval] , e.g. [[[1,3],[6,9]],[2,5]] .

Loading workspace…