DAILY LEETCODE SOLUTION || EASY C++ SOLUTION
\nclass Solution {\npublic:\n    string removeDuplicates(string s) {\n        stack<char> st;\n        for(int i=0;i<s.size();i++)\n        {\n            if(st
```\nclass Solution {\npublic:\n    string removeDuplicates(string s) {\n        stack<char> st;\n        for(int i=0;i<s.size();i++)\n        {\n            if(st.empty())\n            {\n                st.push(s[i]);\n            }\n            else\n            {\n                if(st.top()==s[i])\n                {\n                    st.pop();\n                }\n                else\n                {\n                    st.push(s[i]);\n                }\n            }\n        }\n        string ans="";\n        while(!st.empty())\n        {\n            ans+=st.top();\n            st.pop();\n        }\n        reverse(ans.begin(),ans.end());\n        return ans;\n    }\n};\n```
['Stack', 'C']