@@ -57,15 +57,15 @@ public int[][] multiply(int[][] a, int[][] b) {
5757 int [][] b22 = new int [newSize ][newSize ]; // Bottom-right quadrant of B
5858
5959 // Split matrix A into 4 quadrants
60- split (a , a11 , 0 , 0 ); // Fill a11
61- split (a , a12 , 0 , newSize ); // Fill a12
62- split (a , a21 , newSize , 0 ); // Fill a21
60+ split (a , a11 , 0 , 0 ); // Fill a11
61+ split (a , a12 , 0 , newSize ); // Fill a12
62+ split (a , a21 , newSize , 0 ); // Fill a21
6363 split (a , a22 , newSize , newSize ); // Fill a22
6464
6565 // Split matrix B into 4 quadrants
66- split (b , b11 , 0 , 0 ); // Fill b11
67- split (b , b12 , 0 , newSize ); // Fill b12
68- split (b , b21 , newSize , 0 ); // Fill b21
66+ split (b , b11 , 0 , 0 ); // Fill b11
67+ split (b , b12 , 0 , newSize ); // Fill b12
68+ split (b , b21 , newSize , 0 ); // Fill b21
6969 split (b , b22 , newSize , newSize ); // Fill b22
7070
7171 // --- Conquer Step (Calculate Strassen's 7 products recursively) ---
@@ -113,10 +113,11 @@ public int[][] multiply(int[][] a, int[][] b) {
113113 // Let's use the direct calculation: C22 = M1 - M2 + M3 + M6 (based on P5+P1-P3-P7 and P->M mapping)
114114 int [][] c22 = add (sub (add (m1 , m3 ), m2 ), m6 ); // Matches P5+P1-P3+P7 if M6 maps to P7 sign-inverted? Needs careful check if results are wrong.
115115
116+
116117 // Join the four result quadrants back into the main result matrix
117- join (c11 , resultMatrix , 0 , 0 ); // Place C11 in top-left
118- join (c12 , resultMatrix , 0 , newSize ); // Place C12 in top-right
119- join (c21 , resultMatrix , newSize , 0 ); // Place C21 in bottom-left
118+ join (c11 , resultMatrix , 0 , 0 ); // Place C11 in top-left
119+ join (c12 , resultMatrix , 0 , newSize ); // Place C12 in top-right
120+ join (c21 , resultMatrix , newSize , 0 ); // Place C21 in bottom-left
120121 join (c22 , resultMatrix , newSize , newSize ); // Place C22 in bottom-right
121122 }
122123
0 commit comments