Company: Nokia_9march
Difficulty: medium
Slice master Problem Description You and a group of friends play a game called Slice master. You are given a string S. The objective is to cut S into pieces so that no letter of the alphabet appears in more than one piece. Once the cuts are made, your score is computed like this: For each resulting piece of length X, add X^2 points to the score. Return the lowest score a player can end up with when playing Slice master on string S. Note: The cuts must respect the rule that any given character belongs to exactly one piece. For example: If piece 1 contains the letters [a, m, i, q] then none of those letters may appear in any other piece. Find the minimum possible points a player can score while playing Slice master with String S. Function description Complete the Solve() function. This function takes the following argument and the minimum possible points a player can get while playing Slice master: S: Represents the string to be sliced Input format for custom testing Note: Use this input