Linear time algorithm that takes a direct graph and returns the number of vertices -
how describe linear time algorithm takes directed graph input , returns number of vertices can reached every other vertex. know algorithm take linear time why. , why (o(v2) on adjacency matrix; o(e+v) on adjacency list).
check out kosaraju's algorithm. should able deduce why running times algorithm.
Comments
Post a Comment