Available question text
Given a binary tree, count how many nodes have a value equal to the sum of all values in their descendant nodes (i.e., the subtree sum excluding the node itself). This typically requires computing subtree sums (postorder DFS) and comparing each node’s value to its descendants’ total.
Related questions
Continue with questions that share topics or the same question type.
- Count Nodes Equal to Average of Subtree
Coding · Binary Tree · Depth-First Search · Tree
- Apply Operations to Make Sum of Array Greater Than or Equal to k
Coding
- Check if Number Has Equal Digit Count and Digit Value
Coding
- Count Almost Equal Pairs I
Coding
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 1973. Count Nodes Equal to Sum of Descendants
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source