C# basic list solution
\n    public int CalPoints(string[] ops) {\n        var innings = new List<int>();\n        foreach(var i in ops){\n            switch (i){\n                cas
```\n    public int CalPoints(string[] ops) {\n        var innings = new List<int>();\n        foreach(var i in ops){\n            switch (i){\n                case "+":\n                    innings.Add(innings[^1] + innings[^2]);\n                    break;\n                case "D":\n                    innings.Add(2 * innings[^1]);\n                    break;\n                case "C":\n                    innings.RemoveAt(innings.Count-1);\n                    break;\n                default:\n                    innings.Add(int.Parse(i));\n                    break;\n            }\n        }\n        return innings.Sum();\n    }\n```
[]