Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1273. Delete Tree Nodes
Given a rooted tree (via a parent array) and values for each node, remove all subtrees whose total node-sum equals zero (deletions cascade) and return the count of remaining nodes; the core challenge is computing subtree sums with a postorder DFS and pruning based on those sums.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.