Company: Legalzoom Sde intern On-campus_18may
Difficulty: medium
Objective Suppose there is a sale on blue, green, and red shirts for the next n days. On day i , it costs b i dollars to buy a blue shirt, g i dollars to buy a green shirt, and r i dollars to buy a red shirt. You wish to buy a single shirt for each for the next n days, but with the caveat that you cannot buy the same color shirt on consecutive days. Implementation Implement the function lowest_cost(blue_costs, green_costs, red_costs) which takes in three lists of length n: blue_costs , green_costs , red_costs . Each element in these lists is a positive integer that represents the daily price of a shirt. Your task is to output a list representing the shirt color you buy for each of the n days, such that the total combined cost of the n shirts is minimized. Specifically, your output list will be of length n, where each element in the list is either 'b' , 'g' , or 'r' . The i th element of the output list represents the color of the i th day's shirt. Note that there will be exactly one co