본문 바로가기
Beakjoon&프로그래머스/Java

[프로그래머스/Java] 글자 지우기

by 현장 2025. 2. 11.

-Code

class Solution {
    public String solution(String my_string, int[] indices) {
        String[] answer = my_string.split("");
        for (int idx : indices) answer[idx] = "";

        return String.join("", answer);
    }
}