Back to problems

Track Users From Flight History

Algorithm · Ramp · Hard

An unordered collection flights describes individual flight legs. Every element is a dictionary whose fields are exactly departure_airport, departure_time, arrival_airport, arrival_time, and user_id. Timestamps are UTC ISO-8601 strings. For any one traveler, their legs never overlap in time. A traveler's situation at a moment is one of: 'unknown' before the traveler's earliest recorded departure; a tuple ('in_transit', departure_airport, arrival_airport) while the moment is…

Checking your access…