You are given a string colors of length n, where colors[i] represents the color of the balloon at index i on a rope, and an integer array neededTime of length n, where neededTime[i] represents the time required to remove the balloon at index i from the rope.
The rope is colorful if no two adjacent balloons share the same color. Bob can remove balloons from the rope to achieve this configuration.
Return the minimum total time required to make the rope colorful.
Constraints:
n colors.length neededTime.length
n
neededTime[i]
colors contains only lowercase English letters.
You are given a string colors of length n, where colors[i] represents the color of the balloon at index i on a rope, and an integer array neededTime of length n, where neededTime[i] represents the time required to remove the balloon at index i from the rope.
The rope is colorful if no two adjacent balloons share the same color. Bob can remove balloons from the rope to achieve this configuration.
Return the minimum total time required to make the rope colorful.
Constraints:
n colors.length neededTime.length
n
neededTime[i]
colors contains only lowercase English letters.