알고리즘 n 번째 원소부터 Java

Algorithm/프로그래머스

[알고리즘] n 번째 원소부터 Java

import java.util.ArrayList; import java.util.List; class Solution { public int[] solution(int[] num_list, int n) { List answer = new ArrayList(); for (int i = n-1; i < num_list.length; i++) { answer.add(num_list[i]); } return answer.stream().mapToInt(Integer::intValue).toArray(); } } import java.util.Arrays; class Solution { public int[] solution(int[] num_list, int n) { int[] a= Arrays.copyOfRa..

rw-
'알고리즘 n 번째 원소부터 Java' 태그의 글 목록