Back to Back
A medium Python mock interview question on DataDriven. Practice with AI-powered feedback, real code execution, and a hire/no-hire decision.
- Domain
- Python
- Difficulty
- medium
- Seniority
- L5
Interview Prompt
A maintenance-window export hands you a list of `[start, end]` pairs in `intervals`, and many of them overlap or sit back to back. Collapse each group of touching ranges into a single span that runs from the earliest start to the latest end of the group, where two ranges count as touching even when one only begins exactly where another finishes. Return the cleaned spans as `[start, end]` lists ordered by start, and give back an empty list when the input is empty.
Summary
Windows stacked on windows. Find the real spans.
How This Interview Works
- Read the vague prompt (just like a real interview)
- Ask clarifying questions to the AI interviewer
- Write your python solution with real code execution
- Get instant feedback and a hire/no-hire decision