Skip to content

Instantly share code, notes, and snippets.

@yungyungGwon
Last active August 21, 2020 08:36
Show Gist options
  • Save yungyungGwon/c45239e42e20118bc0cbce5e90422c68 to your computer and use it in GitHub Desktop.
Save yungyungGwon/c45239e42e20118bc0cbce5e90422c68 to your computer and use it in GitHub Desktop.
Algorithm
function solution(arr1, arr2){
var answer = [];
for(var k = 0; k < arr1.length; k++){
answer.push([]);
}
for(var i = 0; i < arr1.length; i++){
for(var j = 0; j < arr1[i].length; j++){
answer[i][j] = arr1[i][j] + arr2[i][j];
}
}
return answer;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment