You are viewing a single comment's thread. Return to all comments →
while(i < static_cast< int > (str.size()-1)) { if(i>-1 && str[i] == str[i+1]) { str.erase(i,2); i--; } else i++; } string::iterator it = adjacent_find(s.begin(), s.end()); while (it != s.end()) { s.erase(it, it + 2); it = adjacent_find(s.begin(), s.end()); }
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 →