C++ Solution || Simple Approach
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int calPoints(vector<string>& operations) {\n\n    vector<int> score;\n    for (int i = 0; i < operations.size(); i++)\n    {\n\n        if (operations[i] == "C")\n        {\n            score.pop_back();\n        }\n        else if (operations[i] == "D")\n        {\n            score.push_back(2 * (score[score.size() - 1]));\n        }\n        else if (operations[i] == "+")\n        {\n            score.push_back(score[score.size() - 1] + score[score.size() - 2]);\n        }\n        else\n        {\n            score.push_back(stoi(operations[i]));\n        }\n    }\n\n    int ans = 0;\n    for (int i = 0; i < score.size(); i++)\n    {\n        ans += score[i];\n    }\n    return ans;\n\n\n    }\n};\n```
['C++']