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 carries a `user` and a `ts` in seconds. Reconstruct each user's sessions, where a session is a stretch of that user's clicks spaced within `gap` seconds of each other, and report for each session the user, its first and last timestamp, and how many clicks it holds.
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