Reconstruct Itinerary
You are given a list of airline tickets where tickets[i] = [fromi, toi] represent the departure and the arrival airports of one flight. Reconstruct the itinerary in order and return it.
Reconstruct Itinerary

You are given a list of airline tickets where tickets[i] = [fromi, toi] represent the departure and the arrival airports of one flight. Reconstruct the itinerary in order and return it.

Example 1:
Input: [["MUC","LHR"],["JFK","MUC"],["SFO","SJC"],["LHR","SFO"]]
Output: ["JFK","MUC","LHR","SFO","SJC"]
Input
arr =[["MUC","LHR"],["JFK","MUC"],["SFO","SJC"],["LHR","SFO"]]

Start

JFK

LHR

MUC

SFO

SJC

Variables
No variables to display
DepthFunction Call
Stack empty
0/15