Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matrix Multiple #382

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Create Matrix
  • Loading branch information
NEERASA-VEDA-VARSHIT authored Oct 31, 2024
commit 805cafe7c833ae43a7cd0cd3634a041e56e7e82c
16 changes: 16 additions & 0 deletions Matrix
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
public class Solution {
public int[][] solve(int[][] A, int[][] B) {
int [][] C = new int[A.length][B[0].length];


for (int i = 0; i < A.length; i++) {
for (int j = 0; j < B[0].length; j++) {
for (int k = 0; k < A[0].length; k++) {
C[i][j] += A[i][k] * B[k][j];
}
}
}

return C;
}
}