
Homework:
Baseball Game
You are keeping score for a baseball game with strange rules. The game consists of several rounds, where the scores of past rounds may affect future rounds’ scores.
At the beginning of the game, you start with an empty record. You are given a list of strings ops, where ops[i] is the ith operation you must apply to the record and is one of the following:
Return the sum of all the scores on the record.
Input: ops = [“5″,”2″,”C”,”D”,”+”]
Output: 30