Simple c++ solution using stack
\nstring removeDuplicates(string s)\n    {\n        stack<char>vishwas;\n       for(int i=0;i<(s.size());i++)\n       {\n          int flag=1;\n           while
```\nstring removeDuplicates(string s)\n    {\n        stack<char>vishwas;\n       for(int i=0;i<(s.size());i++)\n       {\n          int flag=1;\n           while(!vishwas.empty() && vishwas.top()==s[i])\n           {\n              vishwas.pop();\n               flag=0;\n           }\n           if(flag==1)\n           {\n               vishwas.push(s[i]);\n           }\n   \n     \n       }\n                s="";\n          while(!vishwas.empty())\n          {\n              s+=vishwas.top();\n              vishwas.pop();\n          }\n           reverse(s.begin(),s.end());\n        \n        return s;\n    }\n```\n
['Stack']