Problem 1578 · Medium

Minimum Time to Make Rope Colorful

Remove the cheapest balloons so no adjacent retained balloons share a colour by keeping the costlier one in each run. The visual highlights each colour run and its removals.

Open the interactive visualisation