inblog logo
|
stupefyee
    알고리즘문제풀기

    [JAVA 문제 풀이] 배열 뒤집기

    Stupefyee's avatar
    Stupefyee
    Nov 17, 2024
    [JAVA 문제 풀이] 배열 뒤집기
    Contents
    코드
    notion image
     

    코드

    💡
    public class Solution { public int[] solution(int[] num_list) { int[] reverse = new int[num_list.length]; for( int i = 0; i < num_list.length; i++ ) { reverse[i] = num_list[num_list.length - i - 1]; } int[] answer = reverse; return answer; } }
    Share article
    Contents
    코드

    stupefyee

    RSS·Powered by Inblog