배열 원소의 길이

김세호·2022년 12월 3일
0

내 풀이

class Solution {
    public int[] solution(String[] strlist) {
        int[] answer = {};
        answer = new int[strlist.length];
        for(int i = 0 ; i  < strlist.length ; i++){
            answer[i] = strlist[i].length();
        }
        return answer;
    }
}

0개의 댓글