Give an O (V + E)-time algorithm to compute the component graph of a directed graph G

Question:

Give an O (V + E)-time algorithm to compute the component graph of a directed graph G = (V, E). Make sure that there is at most one edge between two vertices in the component graph your algorithm produces.
Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: