티스토리

박카스러버
검색하기내 프로필
알고리즘

프로그래머스 배열 뒤집기 (JAVA)

박카스마시며코딩 2023. 2. 25. 17:51

https://school.programmers.co.kr/learn/courses/30/lessons/120821

 

 

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

블로그 정보

박카스러버

구독하기
박카스러버, 블로그 홈
댓글수0
문의안내
  • 티스토리
  • 로그인
  • 고객센터
© Kakao Corp.