Dsa
Intervals
Easy
The Consensus Window
N researchers are observing a rare celestial event. Each researcher 'i' provides a time window [start_i, end_i] during which their equipment is calibrated and active. Scientists need to find the specific window where ALL researchers are active simultaneously. If no such window exists, output NONE.
Input Format: The first line contains N. The next N lines contain start and end times.
Output Format: Two integers 'start end' of the intersection, or NONE.
Example:
Input:
3
10 50
20 60
30 45
Output:
30 45
Key concepts
intersectionmath
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