Practice Problem

Minimum Height Trees

Difficulty: Medium

Given a tree of n nodes, find all roots that would minimize the tree's height when the tree is rooted at them.