No Days Off
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
- Seniority
- L4
Problem
You're auditing login records from a retention dashboard, where each entry in `activities` carries a `user_id` and a `date` string in 'YYYY-MM-DD' form, and a user can appear more than once on the same day. Return the `user_id`s who were active across at least `min_streak` (default 3) back-to-back calendar days, treating repeated dates for one user as a single day. The result comes back sorted alphabetically.
Summary
Show up every day. Miss one and the count starts over.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.