Problem 3011 · Medium

Find if Array Can Be Sorted

Neighbours with equal set bit counts form free-swapping runs; each run must not start below the previous run maximum.

Open the interactive visualisation