Tweak
Code
Home
Roadmap
Courses
Problems
Dashboard
Pricing
FREE
Home
Roadmap
Courses
Problems
Dashboard
Pricing
Graphs lessons
Course 04
Expand all
Graphs
Decision trees and adjacency
0/26 solved
0%
Backtracking
0/9
1
Subsets & Include/Exclude Decisions
Lesson
Free
Problems 0/3
2
Permutations & Used-State Tracking
Lesson
Problems 0/3
3
Constraint Pruning on Grids & Boards
Lesson
Problems 0/3
Graphs
0/9
Advanced Graphs
0/8
1
Topological Sort & Indegree Queues
Lesson
Problems 0/2
1.1
Alien Dictionary
Taught
1.2
Reconstruct Itinerary
2
Weighted Shortest Paths (Dijkstra)
Lesson
Problems 0/3
3
Union-Find (Disjoint Set)
Lesson
Problems 0/3
9 lessons · 26 problems
Python
Java
C++
JavaScript
TypeScript
C#
Go
Kotlin
Swift
Rust
Node 22.08.0
Reset
Run tests
Loading editor…
Test cases
Run to compare output
Case 1
Input
tickets = [["MUC","LHR"],["JFK","MUC"],["SFO","SJC"],["LHR","SFO"]]
Output
—
Expected
["JFK","MUC","LHR","SFO","SJC"]