arraycopy

· Algorithm
언어_자바 프로그래머스_순서 바꾸기 문제 정수 리스트 num_list 와 정수 n이 주어질 때, num_list를 n번째 원소 이후의 원소들과 n번째까지의 원소들로 나눠 n번째 원소 이후의 원소들을 n번째까지의 원소들 앞에 붙인 리스트를 return하도록 solution 함수를 완성해주세요. 입출력 입력) num_list n [5,2,1,7,5] 3 출력) result [7,5,5,2,1] class Solution { public int[] solution(int[] num_list, int n) { int[] answer = new int[num_list.length]; System.arraycopy(num_list, n, answer, 0, num_list.length-n); System.array..
31daylee
'arraycopy' 태그의 글 목록