Skip to content

Commit 6e9c91f

Browse files
author
Joseph Luce
authored
Update 056_merge_intervals.md
1 parent 82194fc commit 6e9c91f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

leetcode/medium/056_merge_intervals.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,9 @@ class Solution:
3131
## Brownie Points
3232
You can do some more optimizations for some inputs if you mention binary search.
3333
Since after the sort, we can binary search to find the index of the furthest right interval that is overlapping or itself.
34+
This however, does not improve the run-time, the worst case is still O(Nlog(N)) due to the sort.
35+
Even after the sort, worst case can still be O(N) if the array is full of non-overlapping intervals.
36+
37+
```
38+
39+
```

0 commit comments

Comments
 (0)