์ฒด๊ฐ Level : โ
โโ Review: 2์ฐจ์ ๋ฐฐ์ด ์ธ๋ฑ์ค์ ๋ํด ์ดํดํ ์ ์๋ค! |
๐ก2๊ฐ์ ํ๋ ฌ arr1๊ณผ arr2๋ฅผ ์ ๋ ฅ๋ฐ์, ํ๋ ฌ ๋ง์ ์ ๊ฒฐ๊ณผ๋ฅผ ๋ฐํํ๋ ํจ์, solution์ ์์ฑ
https://school.programmers.co.kr/learn/courses/30/lessons/12950
class Solution {
public int[][] solution(int[][] arr1, int[][] arr2) {
int[][] answer = new int [arr1.length][arr1[0].length];
for (int i =0; i < arr1.length; i++){
for (int j =0; j < arr1[0].length; j++){
answer[i][j] = arr1[i][j] + arr2[i][j];
}
}
return answer;
}
}