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 as its sum ( − − ) equals zero.
Access this course and 1400+ top-rated courses and projects.