You are viewing a single comment's thread. Return to all comments →
Mine in C++ :
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; for(int i=0;i<(((int)s.length())-1);i++) { if(s[i]==s[i+1]){ s.erase(i,2); i=-1; } } cout<<(s.length()?s:"Empty String"); return 0; }
Seems like cookies are disabled on this browser, please enable them to open this website
Super Reduced String
You are viewing a single comment's thread. Return to all comments →
Mine in C++ :