Skip to content

Glossary: Coding Interviews in C++

Merge intervals

Also written: merge_slots

Joining overlapping time slots by sorting by start and then merging a slot into the last one whenever `start <= last_end`. It costs O(n log n).

Where the book teaches it

Related terms

IntervalSort first