814 Binary Tree Pruning
814. Binary Tree Pruning
1. Question
Example 1:
Input:
1
\
0
/ \
0 1
Output:
1
\
0
\
1
Explanation:
Only the red nodes satisfy the property "every subtree not containing a 1".
The diagram on the right represents the answer.2. Implementation
3. Time & Space Complexity
Last updated