# Delete Zero Sum Sub-Trees

Given a binary tree, delete any sub-trees whose nodes sum up to zero.

## We'll cover the following

## Statement

Given the root of a binary tree, delete any sub-trees whose nodes sum up to zero.

## Example

In the binary tree below, we need to delete the sub-tree starting at node $5$ as its sum ($5$ − $3$ − $2$) equals zero.

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.