Fundamentals
/
Topological Sort | Topological Order
⏸
00:00
↻
← Prev
Next →
▶
Question
Given n nodes labeled 0..n-1 and a list of directed edges [from, to], return any valid topological ordering. Return an empty array if a cycle exists.
▶
Understand
▶
Approach
▶
My Code
▶
Reference Solution
Compare
7