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

지인·2023년 7월 24일
0

알고리즘

목록 보기
8/21

🐰 문제


풀이

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-1-i];
        }
            
        return answer;
    }
}
profile
열쩡

0개의 댓글