This question evaluates understanding of directed graph concepts and sequence reconstruction, assessing the ability to reason about ordered relationships and one-to-one incoming/outgoing connections between nodes.
You are given a list of directed travel tickets, each represented as a pair [from, to] (city names are strings), e.g. [["A","B"],["B","C"], ...].
The tickets form exactly one valid trip that visits cities in a single chain (no branching):
Return the full ordered itinerary as a list of cities, e.g. given [["A","B"],["B","C"]], return ["A","B","C"].
Constraints
1 <= tickets.length <= 2e5
Output
tickets.length + 1
representing the reconstructed route.