Reconstruct Itinerary
Last updated
What is Reconstruct Itinerary?
Given a list of airline tickets, reconstruct the itinerary in lexical order starting from JFK, using all tickets exactly once. You use DFS with a sorted adjacency list and add nodes to the result only after all their outgoing edges are exhausted, which is Hierholzer's algorithm for Eulerian paths. This problem teaches you a non-obvious graph traversal where the order of adding nodes to the result is reversed.
Free resources to learn Reconstruct Itinerary
More in stage 15: Advanced Graphs
Reconstruct Itinerary: common questions
Can I learn Reconstruct Itinerary in Hindi?
This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain Reconstruct Itinerary in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.
Is this Reconstruct Itinerary tutorial for beginners?
It is lesson 94 of 137 in the free LeetCode roadmap, in stage 15, Advanced Graphs. If you are new to LeetCode, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.