Leetcode 1578. Minimum Time to Make Rope Colorful
Given a string of balloon colors and a removal cost per balloon, remove balloons so no two adjacent colors are equal while minimizing total removal time. The core challenge is to process runs of equal-colored balloons and, using a greedy linear scan, remove all but the highest-cost balloon in each run (n up to 1e5).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.