Company: Paytm_3oct
Difficulty: medium
Visiting Cities Problem Description There are a number of cities in a row, and there are two bus lines (Red and Blue) that go between them. Both lines visit all cities in order, but one may take longer than the other to travel between any two cities. Starting on or moving to the Blue line takes a certain amount of extra time (blueCost). There is no extra time required to start on or move to the Red line. Your task is to determine the minimum time to travel from the first city to each of the cities. Complete the minimumCost function in the editor with the following parameters: int red[n] : the times to travel on the Red line int blue[n] : the times to travel on the Blue line int blueCost : the time penalty to start on or switch to the Blue line Returns: long int[n] : the minimum cost of visiting each of the cities from city 0. Examples Example 1: Input: red = [2, 3, 4], blue = [3, 1, 1], blueCost = 2 Explanation: There are 4 cities numbered 0 through 3. Times from city 0 to cities 1, 2,