Skip to content

Commit 4d7a808

Browse files
committed
feat: Strassen's matrix multiplication algorithm added
1 parent 6724990 commit 4d7a808

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

matrix/strassen_matrix_multiply.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def subtract(matrix_a: Matrix, matrix_b: Matrix) -> Matrix:
3030
"""
3131
Subtract matrix_b from matrix_a.
3232
33-
>>> sub([[5,6],[7,8]], [[1,2],[3,4]])
33+
>>> subtract([[5,6],[7,8]], [[1,2],[3,4]])
3434
[[4, 4], [4, 4]]
3535
"""
3636
n = len(matrix_a)
@@ -41,7 +41,7 @@ def naive_multiplication(matrix_a: Matrix, matrix_b: Matrix) -> Matrix:
4141
"""
4242
Multiply two square matrices using the naive O(n^3) method.
4343
44-
>>> naive_mul([[1,2],[3,4]], [[5,6],[7,8]])
44+
>>> naive_multiplication([[1,2],[3,4]], [[5,6],[7,8]])
4545
[[19, 22], [43, 50]]
4646
"""
4747
n = len(matrix_a)

0 commit comments

Comments
 (0)