Problem 3724 · Medium

Minimum Operations to Transform Array

teaching model: one append copies a value, and sorted matching gives the cheapest pairing of the rest.

Open the interactive visualisation