Company: DevRev_24aug
Difficulty: medium
Crayon Removal Scoring Game Problem Description A box holds a row of crayons, each colored with one of several shades, and each shade is written as a single letter. On each move you may pick out one contiguous run of crayons that all share the same color and take them out of the box. You keep doing this, move after move, until the box is empty. Whenever you take out a run of x crayons (x >= 1) in a single move, you gain x*x points. You are given an integer N, the number of crayons in the box, together with an array colors holding the N colors of the crayons in the box, each written as a letter. Work out the highest total score achievable by the end of the game. Function description Complete the solve() function. This function takes the following 2 arguments and returns the answer. Parameters: N: The total number of crayons in the box colors[]: The colors of the crayons in the box, each given as a single letter. Input Format Note: Use this input format if you are testing against custom