Alice has n balloons arranged on a rope. You are given a 0-indexed string colors where colors[i] is the color of the ith balloon. Alice wants the rope to be colorful: no two consecutive balloons may have the same color. Bob can remove balloons, and removing the ith balloon takes neededTime[i] seconds. Return the minimum time Bob needs to make the rope colorful.
Alice has n balloons arranged on a rope. You are given a 0-indexed string colors where colors[i] is the color of the ith balloon. Alice wants the rope to be colorful: no two consecutive balloons may have the same color. Bob can remove balloons, and removing the ith balloon takes neededTime[i] seconds. Return the minimum time Bob needs to make the rope colorful.