2. Social Networking Graph
Spoj Question
In a social networking site, people are connected with other people. The whole system appears as a giant connected graph. In this question, you are required to answer the total number of people connected at t nodes away from each other (t distance connectivity).
Solution : (Using BFS)
Time Complexity: O(V+E)
Previous1.Maximum number of edges to be removed to contain exactly K connected components in the GraphNext3.The Flight Plan
Last updated
Was this helpful?