Skip to content

Glossary: Coding Interviews

Interval

Also written: intervals, merge intervals, overlap

A range stored as a `(start, end)` tuple, such as a delivery slot. Two intervals overlap when the second starts before the first ends, and sorting by start makes merging them easy.

Where the book teaches it

Related terms

Sort first