Find Dog Comment Subtrees Exceeding a Score Threshold
Problem
Given a Reddit post's comment forest, each comment has an integer score points and a category.
For every dog comment, calculate the sum of scores in its entire rooted subtree. Re...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
