Easy
You are given operations as a space-separated string s. Each token is an integer (record it), "+" (sum of last two), "D" (double last), or "C" (invalidate last). Return the total sum of the record.
Input: s = "5 2 C D +" Output: 30
Input: s = "5 -2 4 C D 9 + +" Output: 27