Untitled
Anonymous
c_cpp
02/11/2025 11:19 AM
304 B
16
Indexable
class Solution {
public:
string removeOccurrences(string s, string part) {
int l = part.size();
while (s.find(part) != -1) {
s.erase(s.find(part), l);
}
return s;
}
};Editor is loading...
Leave a Comment