The Intervals
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
- L3
Interview Prompt
Given a list of date strings in 'YYYY-MM-DD' format, bucket each date into a 7-day week starting from the earliest date. Week 1 covers days 0-6 after the min date; week 2 covers days 7-13; etc. Return a dict mapping the week number (as a string key) to the list of dates that fell in that week, preserving input order within each bucket.
Summary
Timestamps in buckets.
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