Problem 3854 · Medium

Minimum Operations to Make Array Parity Alternating

Only two parity patterns are possible; each wrong element costs one step, and the spread follows from the choices.

Open the interactive visualisation