https://app.codility.com/programmers/trainings/4/disappearing_pairs/ 1. 2022.04.15 시도 소요시간: 21분 import java.util.*; class Solution { public String solution(String S) { Stack prev = new Stack(); for (int i=0; i0 && (S.charAt(prev.peek()) == S.charAt(i))) { prev.pop(); continue; } prev.push(i); } String ret =""; while(!prev.isEmpty()) { ret = S.charAt(prev.pop()) + ret; } return ret; } } 풀이 접근 과정 ..