Skip to content

Commit dcec054

Browse files
committed
Add reference links and complexities
1 parent 4257686 commit dcec054

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/main/java/com/thealgorithms/matrix/MatrixMultiplication.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
package com.thealgorithms.matrix;
22

3+
/**
4+
* This class provides a method to perform matrix multiplication.
5+
*
6+
* <p>Matrix multiplication takes two 2D arrays (matrices) as input and
7+
* produces their product, following the mathematical definition of
8+
* matrix multiplication.
9+
*
10+
* <p>For more details:
11+
* https://www.geeksforgeeks.org/java/java-program-to-multiply-two-matrices-of-any-size/
12+
* https://en.wikipedia.org/wiki/Matrix_multiplication
13+
*
14+
* <p>Time Complexity: O(n^3) – where n is the dimension of the matrices
15+
* (assuming square matrices for simplicity).
16+
*
17+
* <p>Space Complexity: O(n^2) – for storing the result matrix.
18+
*
19+
*
20+
* @author Nishitha Wihala Pitigala
21+
*
22+
*/
23+
324
public final class MatrixMultiplication {
425
private MatrixMultiplication() {
526
}

0 commit comments

Comments
 (0)