Loading...
The Intervals
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
- Seniority
- junior
Problem
Our analytics pipeline groups events into weekly cohorts for retention analysis. Write a function that takes a list of date strings (YYYY-MM-DD) and buckets them into weeks - week 1 starts from the earliest date. Return a dict mapping week number to its list of dates.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.