The root of a DAG is a vertex R such that every vertex of the DAG can

Question:

The root of a DAG is a vertex R such that every vertex of the DAG can be reached by a directed path from R. Write an algorithm that takes a directed graph as input and determines the root (if there is one) for the graph. The running time of your algorithm should be Θ(|V| + |E|).

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: