Re: [algogeeks] no. of paths between two nodes

2012-04-23 Thread bharat b
checking a loop in graph can be done by DFS. On 4/23/12, Anshul Gupta wrote: > There could be finite number of paths between source and destination even > if there is a loop in the graph, you need to check if there is a loop which > lies on a path from source to destination > > Anshul Gupta > > -

Re: [algogeeks] no. of paths between two nodes

2012-04-23 Thread Anshul Gupta
There could be finite number of paths between source and destination even if there is a loop in the graph, you need to check if there is a loop which lies on a path from source to destination Anshul Gupta -- You received this message because you are subscribed to the Google Groups "Algorithm Ge

[algogeeks] no. of paths between two nodes

2012-04-09 Thread Abhishek
I was trying a problem kingdom connectivity in which we had to count the no. of different ways to reach from a given source node to a given destination.There can also be infinite paths in that case we need to output "INFINITE PATHS". Suppose steps[i] array keeps track of the no. of ways to reach it