3/42
Part 2 of 8 · What an end meansLearn and do

Decide what the end of an interval means

Interval questions ask how stretches of time, each a start and an end, sit against each other:

  • Do these two meetings clash?
  • Which hours is nobody busy?
  • How many rooms are in use at the worst moment?
  • Can two people's free days cover a whole rotation?

They show up on the companies' lists. Merge Intervals and Meeting Rooms II are on Netflix's LeetCode tag list (2 sources), and Employee Free Time is on Airbnb's (1 source). The split stays from the start of the lesson are one more.

This lesson builds the pieces one at a time, and ends back at the split stays. The first piece is a choice you make before any code: what the end of an interval means.

Half-open hours stop just before the end, so back-to-back meetings share a number

Predict

Two meetings, (9, 10) and (10, 11), as half-open hours. Do they overlap?

Pick an answer above to see the rest