Search⌘ K
AI Features

Reconstruct Itinerary

Reconstruct Itinerary uses airline tickets to build a complete route starting at JFK, using every ticket once and choosing the lexicographically smallest valid itinerary.

Statement

Given a list of airline tickets where tickets[i] = [fromi ...