Most Easy C++ Solution without STACK || Beginner Friendly
Please Upvote if you like the Solution\n\nclass Solution {\npublic:\n\n    string removeDuplicates(string s) {\n        string ans = "";                // Strin
**Please Upvote if you like the Solution**\n\nclass Solution {\npublic:\n\n    string removeDuplicates(string s) {\n        string ans = "";                // String to store the Final result\n        for(int i=0;i<s.length();i++) {\n            if(ans.empty()) {           // if \'ans\' is empty then just add the current char of string \'s\'\n                ans+=s[i];\n            } else {                    // else compare the current char of string \'s\' with last char of \'ans\'\n                                        // if they are equal then take out  last element from \'ans\' else put that current element in the ans\n                if(s[i] == ans[ans.length()-1]) {\n                    ans.pop_back();\n                } else {\n                    ans+=s[i];\n                }\n            }\n        }\n        return ans;                     // return the result\n    }\n\t\n};
['String', 'C', 'C++']