C++ vector and stuff.  Check it out live on stream
Link to stream in my profile\n\n\nclass Solution {\npublic:\n    int calPoints(vector<string>& ops) {\n        int ans = 0;\n        vector<int> scores;\n      
Link to stream in my profile\n\n```\nclass Solution {\npublic:\n    int calPoints(vector<string>& ops) {\n        int ans = 0;\n        vector<int> scores;\n        int n = ops.size();\n        \n        for(int i = 0; i < n; i++) {\n            int size = scores.size();\n            if(ops[i] == "+") {\n                scores.push_back(scores[size-1] + scores[size-2]);\n            } else if (ops[i] == "C") { \n                scores.pop_back();\n            } else if (ops[i] == "D") {\n                scores.push_back(scores[size-1]*2);\n            } else {\n                scores.push_back(stoi(ops[i]));\n            }\n        }\n        \n        ans = accumulate(scores.begin(), scores.end(), 0);\n        \n        return ans;\n    }\n};\n```
[]