Problem 2009 · Hard

Minimum Number of Operations to Make Array Continuous

Change the fewest entries so the array becomes a run of consecutive distinct integers. The visual sorts and removes duplicates, then slides a window over the values.

Open the interactive visualisation