
Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Intervals Array is sorted. Can you use Binary Search to find the correct position to insert the new Interval.?
Can you try merging the overlapping intervals while inserting the new interval?
This can be done by comparing the end of the last interval with the start of the new interval and vice versa.