Loading interview...
The Trip Aggregator
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
- junior, mid
Interview Prompt
Given a list of trip records, each with a user ID, origin city, destination city, and trip duration in hours, compute the total travel time per user and the number of unique destinations each user visited. Return a list of dicts sorted by user ID, each containing user_id, total_hours, and unique_destinations.
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