Algorithm · Citadel · Hard
(This problem is a variation of LeetCode 332. If you haven't solved that one yet, it's a good idea to tackle it first.) You are given a list of airline tickets, where each tickets[i] = [from_i, to_i] represents a single-use flight ticket from airport from_i to airport to_i. Your task is to construct a complete itinerary that uses every ticket exactly once. The starting airport is not explicitly given; you must infer it from the ticket list. If more than one valid itinerary…
Checking your access…