Find Diameter Endpoints of a Tree
Two breadth-first searches locate a farthest pair in a tree: search from any node, then from the farthest one.
Two breadth-first searches locate a farthest pair in a tree: search from any node, then from the farthest one.