[알고리즘문제풀기] 배열 뒤집기

241120
이나겸's avatar
Nov 20, 2024
[알고리즘문제풀기] 배열 뒤집기
Contents
Q. 풀이

Q.

notion image
 
 

풀이

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; } }
Share article

Nakyeom's Study