Problem 1864 · Medium

Minimum Number of Swaps to Make the Binary String Alternating

Find the fewest arbitrary-position swaps making a binary string alternate.

Open the interactive visualisation