정답 abcd 입니다
public class Main {
public static String rf(String str, int index, boolean[] seen) {
if(index < 0) return "";
char c = str.charAt(index);
String result = rf(str, index-1, seen);
if(!seen[c]) {
seen[c] = true;
return c + result;
}
return result;
}
public static void main(String[] args) {
String str = "abacabcd";
int length = str.length();
boolean[] seen = new boolean[256];
System.out.print(rf(str, length-1, seen));
}
}
정답 abcd 입니다
모든 문제들의 저작권은 원저작권자에게 있습니다. 본 사이트는 웹상에 공개되어 있는 문제만 모아서 보여드립니다.
저작권 안내 데이터 보호 안내 제휴 문의
copyright 2026 뉴비티::새로운 CBT 시스템 - newbt.kr (Listed on LeanVibe)