Problem 2313 · Medium

Minimum Flips in Binary Tree to Get Result

Each node keeps the cost of making it false and true; operators combine child pairs bottom-up.

Open the interactive visualisation