Problem 1217 · Easy

Minimum Cost to Move Chips to The Same Position

Move every chip to a single common position, where moving two steps costs nothing and moving one step costs one, and find the minimum total cost. The visual groups chips by parity and compares the two groups.

Open the interactive visualisation