I am still not clear on the question!
Do it suggest that we have m people with n friends each and the problem is
to find mutual friends b/w any two people?
And by the mutual friend, does it mean that he has to be a friend of both
of the people or can he be indirectly linked? Your previous comment
suggests the latter one but I won't suggest that.

On Wed, Jan 18, 2012 at 4:39 PM, WgpShashank <[email protected]>wrote:

> @atul .. yeah bfs may not work or less efficient . ..assume graph of m*n
> nodes , m,n are very large .. one simple thing we can do find the path
> between any given two nodes i,j , if path exist list out all the nodes we
> encounter , one imprtant thinsg to be noticed is that , path can be of 1
> degree , 2 degree , or any k degree , where k <=m-1 & k<=n-1  e.g.
> ....there many issue need to take careoff such as there may more then one
> path from source to dest. as each path has different length so we have to
> check if we have already visited the same node or not  . if not then add
> this node to final list which shows the all mutual friends between given
> nodes .
>
> @all Whats Say ?
>
>
> Thanks
> Shashank Mani Narayan
> Computer Science
> BIrla Institute of Technology Mesra
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/algogeeks/-/QJ7ku0ueeBwJ.
>
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to