mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2026-11-30 02:46:52 +08:00
* refactor: clean to roadmap content * refactor: move shared helpers into scripts/lib
727 B
727 B
Insert Interval
Given a sorted list of non-overlapping intervals and a new interval, insert it and merge any overlaps. You add all intervals that end before the new one starts, merge all that overlap with it, then add the rest. This problem teaches you to handle three distinct regions when inserting into a sorted interval list, a pattern that requires careful boundary thinking.
Visit the following resources to learn more: