[문제링크 - 프로그래머스 - 배열 뒤집기] https://school.programmers.co.kr/learn/courses/30/lessons/120821
class Solution {
public int[] solution(int[] num_list) {
int[] answer = new int[num_list.length];
int n = 0;
for(int i=num_list.length-1; i>=0; i--){
answer[n++] = num_list[i];
}
return answer;
}
}
class Solution1{
public int[] solution(int[] num_list){
List<Integer> list = Arrays.stream(num_list).boxed().collect(Collectors.toList());
Collections.reverse(list);
return list.stream().mapToInt(Integer::intValue).toArray();
}
}