JAVA_프로그래머스_그림 확대 풀이 class Solution { public String[] solution(String[] picture, int k) { int height = picture.length; int width = picture[0].length(); String[] answer = new String[height * k]; // stringbuilder를 통해 문자열을 만들고 저장 String[] rows = new String[height]; for(int i = 0; i < height; i++){ StringBuilder sb = new StringBuilder(width * k); for(int j = 0; j < width; j++){ char ch = picture[i].charAt(j); for(int temp = 0; temp < k; temp++) sb.append(ch); } rows[i] = sb.toString(); } // answer 데...
원문 링크 : JAVA_프로그래머스_그림 확대