GeezerVison is showing github.com — leetcode/insert-interval at gh-pages · codingwhite/leetcode
/
insert-interval
/Copy pathDirectory actions
More options
More optionsDirectory actions
More options
More options/
insert-interval
/Copy pathFolders and files
| Name | Name | Last commit message | Last commit date |
|---|
parent directory.. |
| | | |
| | | |
| | | |
|
Merge Intervals does a sort inside the function, good news for us is that the input is already sorted.
What we need to do is to Search Insert Position, and insert the new interval there. (Insertion Sort)
Now call Merge Intervals without sort.