Find Minimum Diameter After Merging Two Trees
Joining two trees by one edge gives a diameter found from the two diameters alone: the larger of them, or the two radii plus one.
Joining two trees by one edge gives a diameter found from the two diameters alone: the larger of them, or the two radii plus one.