NeetCode #601LC-310MediumGraphsNC 250
← Back to All Problems#601 · #310 · Minimum Height Trees(最小高度树)
📌 Problem Statement & Constraints
A tree is an undirected graph with no cycles. Given a tree of
n nodes labelled 0..n-1 and edges, return all labels that can be roots of a minimum height tree, in any order. Constraints: 1 <= n <= 2 * 10^4, edges.length == n - 1.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!