beats 90% | c++ simple solution
\nclass Solution {\npublic:\n    int calPoints(vector<string>& ops) {\n            \n        stack <int> st;\n            \n        for(int i = 0; i < ops.size(
```\nclass Solution {\npublic:\n    int calPoints(vector<string>& ops) {\n            \n        stack <int> st;\n            \n        for(int i = 0; i < ops.size(); i++){\n                \n                if(ops[i] == "+"){\n                        \n                        int val1,val2;\n                        \n                        val1 = st.top();\n                        st.pop();\n                        val2 = st.top();\n                        st.pop();\n                        \n                        st.push(val2);\n                        st.push(val1);\n                        st.push(val2 + val1);\n                        \n                }else if(ops[i] == "D"){\n                        \n                        int val = st.top();\n                        st.push( val*2 );\n                        \n                }else if(ops[i] == "C")                        \n                        st.pop();\n                else \n                        st.push(stoi(ops[i]));\n                                        \n        }\n            \n        int output = 0;  \n            \n        while(!st.empty()){\n                \n            output += st.top();\n            st.pop();\n                \n        }\n            \n            return output;\n    }\n};\n```\n**Please upvote my solution If you like it..**
['C']