Search⌘ K
AI Features

Tree Diameter

Tree Diameter asks you to use an undirected tree described by edge pairs and return the number of edges in the longest path between any two nodes.

Statement

Given an undirected tree with n ...