[프로그래머스]배열 뒤집기

박예림·2023년 2월 28일
0

코테

목록 보기
43/132

class Solution {
    public int[] solution(int[] num_list) {
        int[] answer = new int[num_list.length];
        
        for (int i=num_list.length-1, j=0; i >= 0; i--,j++){
            answer[j] = num_list[i];
        }
        
        return answer;
    }
}
profile
응애 나 아기개발자

0개의 댓글