You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sorting.md
+20-24Lines changed: 20 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -427,38 +427,34 @@ public:
427
427
428
428
### [Insert Interval In a Sorted List](https://leetcode.com/problems/insert-interval/)
429
429
430
-
In 2 pass found start and end bound. Start is max index with intervals\[start\]\[1\]<= newInterval\[0\] and end is min index with intervals\[end\]\[0\]<= newInterval\[1\]
430
+
Insert the new interval in the intervals array at correct position, shifting all the older items. Then perform approach from Merge Intervals problem
0 commit comments