GitHub

https://github.com/Choidongjun0830

Java

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

gogi masidda 2023. 11. 2. 21:50
class Solution {
    public int[] solution(int[] num_list) {
        int len = num_list.length;
        int[] answer = new int[len];
        for(int i = 0; i < len; i++) {
            answer[len-1-i] = num_list[i];
        }
        return answer;
    }
}
728x90