Given a list of airline tickets, reconstruct the itinerary in order.
Sample Input:
[["MUC","LHR"],["JFK","MUC"],["SFO","SJC"],["LHR","SFO"]]
Sample Output:
["JFK","MUC","LHR","SFO","SJC"]
Hints
Hint 1
Model as Eulerian path problem
Hint 2
Use Hierholzer's algorithm
Hint 3
Sort destinations lexicographically