Problem 3192 · Medium

Minimum Operations to Make Binary Array Elements Equal to One II

Track whether the suffix is currently flipped, and flip from any position that reads zero under those flips.

Open the interactive visualisation