Skip to content

Latest commit

 

History

History
3 lines (2 loc) · 173 Bytes

File metadata and controls

3 lines (2 loc) · 173 Bytes

Idea behind the solution

The idea here is to remove the leafs while its value is 0. By doing a DFS, we are able to reach the leaf first and return removing it if needed.