반응형 2차원으로 만들기1 [프로그래머스 - JAVA] 2차원으로 만들기 내 풀이 import java.util.Arrays; import java.util.ArrayList; import java.util.stream.Collectors; class Solution { public int[][] solution(int[] num_list, int n) { int[][] answer = {}; int t = num_list.length / n; answer = new int[t][n]; ArrayList arrays = (ArrayList) Arrays.stream(num_list).boxed().collect(Collectors.toList()); for (int i = 0; i < t; i++) { for (int j = 0; j < n; j++) { answer[i][j.. 2023. 3. 11. 이전 1 다음 반응형