Learn
Practice
Interview
Resources
Newsletter
F
Toggle theme
0
F
0
Toggle menu
Animations
← Back to All Animations
332. Reconstruct Itinerary
Backtracking
Hierholzer
1
findItinerary()
Standard
With Cycle
Small
Custom
tickets
=
[["MUC","LHR"],["JFK","MUC"],["SFO","SJC"],["LHR","SFO"]]
JFK
LHR
MUC
SFO
SJC
Result Itinerary:
JFK
Unvisited
Current
In Result
Unused
Using
JFK
LHR
MUC
SFO
SJC
Result Itinerary:
JFK
Unvisited
Current
In Result
Unused
Using
JFK
LHR
MUC
SFO
SJC
Result Itinerary:
JFK
Unvisited
Current
In Result
Unused
Using
JFK
LHR
MUC
SFO
SJC
Result Itinerary:
JFK
MUC
Unvisited
Current
In Result
Unused
Using
JFK
LHR
MUC
SFO
SJC
Result Itinerary:
JFK
MUC
Unvisited
Current
In Result
Unused
Using
JFK
LHR
MUC
SFO
SJC
Result Itinerary:
JFK
MUC
LHR
Unvisited
Current
In Result
Unused
Using
JFK
LHR
MUC
SFO
SJC
Result Itinerary:
JFK
MUC
LHR
Unvisited
Current
In Result
Unused
Using
JFK
LHR
MUC
SFO
SJC
Result Itinerary:
JFK
MUC
LHR
SFO
Unvisited
Current
In Result
Unused
Using
JFK
LHR
MUC
SFO
SJC
Result Itinerary:
JFK
MUC
LHR
SFO
Unvisited
Current
In Result
Unused
Using
JFK
LHR
MUC
SFO
SJC
Result Itinerary:
JFK
MUC
LHR
SFO
SJC
Unvisited
Current
In Result
Unused
Using
JFK
LHR
MUC
SFO
SJC
Result Itinerary:
JFK
MUC
LHR
SFO
SJC
Unvisited
Current
In Result
Unused
Using
Step:
Start: Reconstruct itinerary from JFK using all tickets
0 / 16
Standard
With Cycle
Small
Custom
tickets
=
[["MUC","LHR"],["JFK","MUC"],["SFO","SJC"],["LHR","SFO"]]
0 / 16
Step:
Start: Reconstruct itinerary from JFK using all tickets
1
findItinerary()