Maximum sum of distances of a node to every other node
Given an undirected, connected tree with N nodes valued from 0 to N - 1 and an array edges[][2] represents the edges between two nodes, the task is to find the maximum sum of distances of a node to every other node in the tree. Examples: Input: N = 5, edges = { {0, 2}, {1, 3}, {0, 1}, {3, 4} } Outpu