We can modify BFS to traverse edge (u,v) twice. The first time is the tree edge (u,v), and the second time is (v,u).
June 20, 2007
1 Comment »
RSS feed for comments on this post. TrackBack URI
We can modify BFS to traverse edge (u,v) twice. The first time is the tree edge (u,v), and the second time is (v,u).
RSS feed for comments on this post. TrackBack URI
In line 13 we’re checking if the node is WHITE, we should add an else statement that will just process the edge.
Comment by dzo — November 20, 2008 @ 10:21 pm