Problem 2612 · Hard

Minimum Reverse Operations

Treat each position of the single 1 as a BFS node; a window reversal moves it to a mirrored position inside the window.

Open the interactive visualisation