[Google SDE] Tree Diameter
(This question has been seen in the interviews of the following companies: Google)
Find the longest diameter of a tree. The diameter of a tree is defined as the number of edges on the longest path in the tree.
Copyright © A++ Code Bootcamp 2023