Problem 2380 · Medium

Time Needed to Rearrange a Binary String

Each second every 01 pair swaps; the time a zero needs follows from the count of ones before it.

Open the interactive visualisation