Available question text
Given a rooted tree where each node has a color, find the size of the largest subtree (a node plus all its descendants) in which every node has the same color. The core challenge is to traverse the tree and aggregate whether each subtree is uniform and its size (typically via post-order DFS/DP) to compute the maximum.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 3004. Maximum Subtree of the Same Color
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source