웅재의 코딩세상
[프로그래머스] ad 제거하기 본문
- 풀이
#include <string>
#include <vector>
using namespace std;
vector<string> solution(vector<string> strArr) {
vector<string> answer;
for(int i=0; i<strArr.size(); i++){
if(strArr[i].find("ad") == string::npos) answer.push_back(strArr[i]);
}
return answer;
}
반응형
'코딩테스트 > 프로그래머스 - LV 0' 카테고리의 다른 글
[프로그래머스] x 사이의 개수 (0) | 2024.01.31 |
---|---|
[프로그래머스] l로 만들기 (0) | 2024.01.31 |
[프로그래머스] 꼬리 문자열 (0) | 2024.01.31 |
[프로그래머스] n개 간격의 원소들 (0) | 2024.01.31 |
[프로그래머스] 가까운 1 찾기 (0) | 2024.01.31 |