문제
나의 생각
오랜만에 2차원 배열이 나와서 기억이 가물가물한데 인터넷을 찾아보고 대충감을 잡고 접근.
나의 답안
public static int[][] solution(int[] num_list, int n) {
int[][] answer = new int[num_list.length / n][n];
int num = 0;
for (int i = 0 ; i < answer.length ; i++){
for(int j = 0 ; j < answer[i].length ; j ++){
answer[i][j] = num_list[num];
num++;
}
}
return answer;
}