RAYTHEON TECHNOLOGIES | Interview Question | Off-Campus (2022)

Question · Posted Jun 2026

Problem: Minimum Time to Make Rope Colorful Problem Statement Alice has a rope made up of colored balloons represented by the string colors. Each balloon has a removal cost given in the array neededTime. Remove the minimum total time so that no two adjacent balloons have the same color. Return the minimum total removal cost. Example Input: colors = "abaac" neededTime = [1,2,3,4,5] Output: 3 Explanation: Remove the balloon with removal cost 3 to avoid adjacent 'a' balloons.

The full answer & interview discussion are available to premium members.

Log in Create a free account