Skip to content

Commit

Permalink
이슈 #466에서 솔루션 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Feb 11, 2025
1 parent 6083b40 commit 7570048
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions LeetCode/1910._Remove_All_Occurrences_of_a_Substring.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
class Solution {
public:
string removeOccurrences(string s, string part) {
size_t pos;

while ((pos = s.find(part)) != string::npos) {
std::cout << pos;
s.erase(pos, part.length());
}

return s;
}
};

0 comments on commit 7570048

Please sign in to comment.