You keep a running record of scores. Given a list of string operations, apply each: an integer x records a new score x; '+' records the sum of the previous two scores; 'D' records double the previous score; 'C' removes the previous score. Return the total sum of all recorded scores after processing every operation. The input is JSON {ops}.
Input: JSON {ops} — a list of string operations.
Output: Integer — the sum of all recorded scores.
Input: {"ops":["5","2","C","D","+"]}
Output: 30
Explanation: Records 5, then 5+10+15.Input: {"ops":["1"]}
Output: 1
Explanation: A single score.Input: {"ops":["5","-2","4","C","D","9","+","+"]}
Output: 27
Explanation: Applies each operation in order.1<=ops<=1000operations are valid