Blind 75 Flashcards

1
Q

Merge a list of intervals

A
  1. Sort the start and end times of the intervals

2. Iterate based on end index; if start[i+1] > end[i], add [start[j], end[i]] and set j = i+1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly