Company: Legalzoom Sde intern On-campus_18may
Difficulty: medium
Objective Imagine a shirt shop running a sale on blue, green, and red shirts over the next n days. On day i , a blue shirt costs b i dollars, a green shirt costs g i dollars, and a red shirt costs r i dollars. You need to buy exactly one shirt each day for all n days, with the restriction that you can't pick the same color on two days in a row. 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 job is to produce a list showing which shirt color to buy on each of the n days so that the combined cost across all n days is as low as possible. That output list must have length n, with each entry being either 'b' , 'g' , or 'r' . The i th entry gives the color bought on the i th day. You're guaranteed that exactly one color sequence achieves the lowest total cost. Examples For input