Dsa
Intervals
Easy
Find Overlapping Days
You are given multiple date ranges in 'YYYY-MM-DD YYYY-MM-DD' format representing vacations. Determine if any of the vacations overlap. Print 'Overlap' if there are overlaps, otherwise print 'No Overlap'.
Input:
- A single line containing space-separated date ranges.
Output:
- A single line indicating whether there are overlaps or not.
Example:
Input:
2023-01-01 2023-01-10 2023-01-05 2023-01-15
Output:
Overlap
Key concepts
intervalsoverlap detection
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now