Problem 1702 · Medium

Maximum Binary String After Change

Apply the allowed swaps that move zeros left to make the largest binary string possible. The visual shows the string transforming step by step with the single leftover one moving into place.

Open the interactive visualisation