🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Interval Problems: all 10 questions

Quiz: Interval Problems · Question 1 of 10

When do closed intervals [a1, b1] and [a2, b2] overlap?

When do closed intervals [a1, b1] and [a2, b2] overlap?

  1. A.When a1 < a2
  2. B.When a1 <= b2 and a2 <= b1
  3. C.When b1 == b2
  4. D.When a1 + b1 > a2 + b2
Answer & explanation

Correct answer: When a1 <= b2 and a2 <= b1

They fail to overlap only if one ends before the other starts; this is the opposite of that.

Can you get the rest right without peeking?

Take the timed Quiz: Interval Problems quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →