Problem 3228 · Medium

Maximum Number of Operations to Move Ones to the End

Each zero that follows a run of ones adds the number of ones before it, since every one ahead can jump past it.

Open the interactive visualisation