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 980a8b8 commit d4a95a6Copy full SHA for d4a95a6
matrix/strassen_matrix_multiply.py
@@ -1,3 +1,18 @@
1
+"""
2
+Strassen's Matrix Multiplication Algorithm
3
+------------------------------------------
4
+An optimized divide-and-conquer algorithm for matrix multiplication that
5
+reduces the number of multiplications from 8 (in the naive approach)
6
+to 7 per recursion step.
7
+
8
+This results in a time complexity of approximately O(n^2.807),
9
+which is faster than the standard O(n^3) algorithm for large matrices.
10
11
+Reference:
12
+https://en.wikipedia.org/wiki/Strassen_algorithm
13
14
15
16
from typing import List
17
18
Matrix = List[List[int]]
0 commit comments