Topological sorting problem
When talking about DFS, there are two correctness-related theorems (see lecture 3)
Parenthesis theorem theorem
White path theorem theorem
Input
Output
Solution
Run
Strongly connected component (SCC) definition
Input
Output
Solution
Run
Partition of a bipartite graph
Input
Output
Solution
Let
Distances in a graph
Input
Output
Solution
Run topological sorting and then recursively (DP) calculate distances of vertices after