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

  1. Read the vague prompt (just like a real interview)
  2. Ask clarifying questions to the AI interviewer
  3. Write your python solution with real code execution
  4. Get instant feedback and a hire/no-hire decision