Re: [algogeeks] bfs doubt

2011-01-18 Thread ankit sablok
one possible solution can be that while storing the graph using adjacency lists u can associate a color variable with each edge so that u color the edge as u traverse it like if u want to check wether edge (u,v) has been traversed while traversing u's adjacecny list check wether (u,v) has been colo

[algogeeks] bfs doubt

2011-01-18 Thread rahul rai
Let G = (V, E) be a **, cONNECTED undirected graph. Give an O(V + E)-time algorithm to compute a path in G that traverses each edge in E exactly once in each direction. Describe how you can find your way out of a maze if you are given a large supply of pennies. from clrs -- You received this me