PROBLEM STATEMENT: Practice, Contest CATEGORY: EASYMEDIUM PREREQUISITES: Depth First Search, Minimum Spanning Tree, Graph. EXPLAINATION: Once this is done, to calculate the busyness for every node, we know that any particular node is connected to n1 other nodes (directly or indirectly, because it was a connected graph). Also we know the adjacently connected nodes of a given node. Therefore, starting from any adjacent node we multiply its connectivity with the remaining number of nodes. Doing this for all the adjacent nodes will give you the final busyness for a particular node. (See the code for more clarity on this concept) Author: Prayank Mathur
This question is marked "community wiki".
asked 21 May '15, 16:25
