DFS or BFS traversal would do to find the relationships in a network of friends . Traverse the graph and appropriately find the nodes (friends) which are at one level below in a graph(tree). As Linkedin does , it finds people connected to you at various levels of depth as people connected at degree 1 and 2 and so.
On Tue, Jul 26, 2011 at 6:28 PM, Optimus Prime <[email protected]>wrote: > I have no idea on what the 1st question is about as i have never used > orkut... > 1. Regarding the 2nd one. Maintain a adjacency list for both the > user's friends. > 2. Move through the friends of user 1 and mark them grey. > 3. Move through the user 2 friends and mark them grey if not marked > and mark them black if already grey. > Finally traverse any 1 user's friends and pick out the black nodes > > > On Jul 26, 4:56 pm, WgpShashank <[email protected]> wrote: > > if geeks are Really Interested in Application of Graph then why not start > > from Now :) > > > > 1. if you click on any orkut member's name you will notice the > relationship > > for both of you indicating through whom you are interconnected or in > certain > > cases you won't get this path. if you have to propose algorithm what > would > > be the one ... > > > > 2 . find the all common friends of between two friends in two friends. > > > > Will try to reply asap once it generated good discussion :) > > > > Shashank Mani > > Computer Science > > Birla Institute of Technlogy,Mesra > > -- > 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. > > -- Regards Rajeev N B <http://www.opensourcemania.co.cc> -- 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.
