Problem 3191 · Medium

Minimum Operations to Make Binary Array Elements Equal to One I

Scan from the left and flip each window of three that starts with a zero, since that zero can only be fixed by that window.

Open the interactive visualisation