Problem 2460 · Easy

Apply Operations to an Array

Double each adjacent equal pair in turn, zero the partner, then shift the nonzero values to the front.

Open the interactive visualisation