You are given airline tickets as pairs [from, to] of airport codes. Write findItinerary(tickets) returning the itinerary that starts at "JFK", uses every ticket exactly once, and is the smallest in lexical order among all such itineraries (compare the arrays element by element as strings).
- An itinerary is an array of airport codes, one more than the number of tickets
- A valid itinerary is guaranteed to exist
- The same ticket can appear more than once
- Always taking the smallest next airport can strand unused tickets, so a plain greedy walk is not enough