Singly connected Graph?
问题 A singly connected graph is a directed graph which has at most 1 path from u to v ∀ u,v. I have thought of the following solution: Run DFS from any vertex. Now run DFS again but this time starting from the vertices in order of decreasing finish time. Run this DFS only for vertices which are not visited in some previous DFS. If we find a cross edge in the same component or a forward edge, then it is not Singly connected. If all vertices are finished and no such cross of forward edges, then