Between the Clicks
A medium Python mock interview question on DataDriven, with an AI interviewer who asks follow-up questions and a hire or no-hire decision at the end.
- Domain
- Python
- Difficulty
- medium
- Seniority
- mid
Interview Prompt
Our click stream reaches us out of time order, with each event carrying a `user` and a `ts` in seconds. Reconstruct every user's sessions, where a session is a run of that user's clicks with consecutive clicks within `gap` seconds of each other, and report each session's user, first and last timestamp, and click count.
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 and run your Python against test cases
- Answer the interviewer's follow-up questions, then get a hire or no-hire decision