ㅜ
23.09.09. 풀었던 문제들
Programmers PCCP 모의고사 #1 외톨이 알파벳, 5분 프로그래머스 짝지어 제거하기를 풀어봤다면 바로 이어져 나오는 중복 char를 쉽게 줄일 수 있다. stack을 쓰든, string의 뒤에 중복을 빼고 붙여넣든. 이 방법을 사용하면 중복을 제거할 수 있고, 그러면 map으로 count만 하면 된다. 간단한 손풀기 문제. #include #include #include #include #include using namespace std; string solution(string str) { stack stk; for(char c : str){ if(!stk.empty() && stk.top() == c) continue; stk.push(c); } map m; while(!stk.empty(..