Solution 1) 내 풀이
import java.util.Arrays;

class Solution {
    public int[] solution(int[] num_list, int n) {
        return Arrays.copyOfRange(num_list, 0, n);
    }
}
이번엔 117명에 들어갔다. (넘나 간단한 것들은 다 생각이 같지 !)
copyOfRange(배열, 시작값, 마지막값) 마지막 값은 -1해서 생각하기.

 

+ Recent posts