Between the Clicks
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
- mid
Interview Prompt
Our ad-click pipeline ingests events under at-least-once delivery, so a single user's clicks can arrive out of order. Each event has a `user` and a `ts` in seconds; reconstruct each user's sessions, where a session is a stretch of that user's activity with no more than `gap` seconds between one click and the next. For each session, report the user, its first and last timestamp, and how many clicks fell inside it.
Summary
Clicks arrive scrambled. Find where one visit ends and the next begins.
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