CodeWars 예순 네 번째 문제

Updated:

Checking Groups

public class Groups{

    public static boolean groupCheck(String s){
        String beforeS = "";

        do {
            beforeS = s;
            s = s.replaceAll("(\\(\\))|(\\{\\})|(\\[\\])", "");
        }while(beforeS.length() > s.length());

        return s.length() == 0;
    }
}
  • 이건 이전에 나온 문제랑 같다.
  • 딱히 볼게 없었다.