Problem 3724 · Medium
teaching model: one append copies a value, and sorted matching gives the cheapest pairing of the rest.
Open the interactive visualisation