Topological Sort (Directed Graph Ordering)

Problem: Topological Sort (Directed Graph Ordering)

Given a directed graph with n nodes labeled 0..n-1, and a list of directed edges edges, where each edge (u, v) means **you must finish/v...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: