Solution 1:
For each vertex v, construct DFS tree T rooted from v. Check whether T has forward or cross edge. If every T has no forward or cross edge, then G is singly connected. Time complexity is O(V(V+E)).
June 22, 2007
Exercises 22.3-12
No Comments Yet »
No comments yet.
RSS feed for comments on this post. TrackBack URI