We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 35ac806 commit 8f33c3fCopy full SHA for 8f33c3f
juhee067/[week1]Array/procession_multiply.js
@@ -0,0 +1,16 @@
1
+function solution(arr1, arr2) {
2
+ const row = arr1.length;
3
+ const col1 = arr1[0].length;
4
+ const col2 = arr2[0].length;
5
+ const answer = [];
6
+ const result = Array.from(Array(row), () => Array(col2).fill(0));
7
+
8
+ for (let i = 0; i < row; i++) {
9
+ for (let j = 0; j < col2; j++) {
10
+ for (let k = 0; k < col1; k++) {
11
+ result[i][j] += arr1[i][k] * arr2[k][j];
12
+ }
13
14
15
+ return result;
16
+}
0 commit comments