Leetcode 1578. Minimum Time to Make Rope Colorful | Hello Interview