NeetCode #402LC-250MediumTreesNC Algo100
← Back to All Problems#402 · #250 · Count Univalue Subtrees(统计同值子树)
📌 Problem Statement & Constraints
Given the root of a binary tree, return the number of uni-value subtrees: subtrees in which every node has the same value. Constraints: the number of nodes is in
[0, 1000], -1000 <= Node.val <= 1000.🔒
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!