프로그래머스 - 배열 뒤집기

박유진·2023년 10월 3일
0

문제링크 - 프로그래머스 - 배열 뒤집기

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

0개의 댓글

관련 채용 정보