phaedrus wrote:
Quote:
I need to implement a concept somewhat similar to social networking
sites like orkut/linkedIn etc etc... The story is below......
>
'A' can send request to any other member say 'B' to join his network.
The B joins his network. Now 'A' can approach the 'B' 's contacts by 2
ways directly or through 'B' and so on. Now suppose there is 'Z'
somewhere in the chain of 'B' , when I search for 'Z' it will display
me that you can reach 'Z' from 'B' using the chain or how can I view
the chain.
>
My question is "do i need to write/implement graph theory here or is
there any other rapid development approach available for this problem"
The path thru B to Z is just "minimum cost spanning tree", which is one of
the simplest graph theory algorithms available. Look that up, and you might
even find an implementation in C++ (the topic of this newsgroup).
Don't fear doing it the right way!
--
Phlip
http://www.greencheese.us/ZeekLand <-- NOT a blog!!!