Loading...

The Trip Grouper

A easy Python interview practice problem on DataDriven. Write and execute real python code with instant grading.

Domain
Python
Difficulty
easy
Seniority
mid, senior

Problem

Write a function that takes a list of trip dicts, each with 'destination', 'duration_days', and 'traveler' keys. Return a dict mapping each destination to the total duration days spent there across all trips.

Practice This Problem

Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.