Skip to content

Glossary: Coding Interviews in Java

Interval

Also written: intervals, overlap, merge intervals

A range with a start and an end, such as Alex's delivery slot `(540, 570)`. Two intervals overlap when the second starts before the first ends, and sorting by start makes merging them one pass.

Where the book teaches it

Related terms

Record