Problem 926 · Medium

Flip String to Monotone Increasing

Change the fewest characters in a binary string so that all zeros come before all ones. The visual sweeps a split line across the string while a cost counter updates.

Open the interactive visualisation