Loading...

The Repeat Visitor

A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.

Domain
Python
Difficulty
medium
Seniority
mid, senior

Problem

Given a list of purchase records, each with a user ID and a date, identify all users who made at least two purchases within a rolling window of N days of each other. Return the list of matching user IDs sorted alphabetically.

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.