Problem 2216 · Medium

Minimum Deletions to Make Array Beautiful

Delete the fewest values so the retained array has even length and unequal values in each adjacent pair.

Open the interactive visualisation