Count the Number of Good Nodes
Root the tree at node 0. A node is good when all of its child subtrees have the same size. Count the good nodes.
Root the tree at node 0. A node is good when all of its child subtrees have the same size. Count the good nodes.