Company: Goldman Sachs_22july
Difficulty: medium
Closeness Centrality Problem Description A businessman wants to expand his vegetable distribution business across the entire state. To enable fast distribution, he decides to build storage facilities in cities that are centrally located and well-connected to other cities. He models the state as a graph where each city is represented as a node, and a direct road between two cities is represented as an edge. All edges are of equal length. He wants to identify the cities that are best suited for setting up storage facilities — these are the cities with the highest “Closeness Centrality”. Closeness Centrality is a measure of how distant the city is from other cities. It is calculated as the reciprocal of the sum of the length of the shortest paths between the city and all other cities in the network: Cities with lower total shortest-path distances to other cities have higher Centrality. Your task is to help the businessman with a program to find the city or cities that have the highest Clo