Company: UBS_7aug
Difficulty: medium
Merge Networks Problem Description Developers are building a mapping library to help with road planning. There are currently two road networks, network A and network B . Each network is a tree : network A has networkA_nodes places numbered 1 to networkA_nodes , and network B has networkB_nodes places numbered 1 to networkB_nodes . For every i , there is an undirected road between networkA_from[i] and networkA_to[i] in network A, and an undirected road between networkB_from[i] and networkB_to[i] in network B. The developers will add exactly one new undirected road that connects one place of network A to one place of network B. After that, the two networks form a single network. The distance between two places is the number of roads on the simple path between them. Choose the new road so that the maximum distance between any two different places in the combined network is as small as possible, and return that minimum possible maximum distance. Complete the function calculateMin(networkA_