Problem G. Down the Pivot had an interesting subproblem, given a tree where nodes contain 0 or 1, in one operation, you are allowed to select one downward path and flip it. What is the minimum number of operations required to set all nodes to 0?
So I created a video discussing 3 techniques:
- Minimum operations when you are allowed to flip a subarray.
- Minimum operations when you are allowed to flip a subtree.
- Minimum operations when you are allowed to flip a downward path.







