Untitled
unknown
c_cpp
10 months ago
228 B
8
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