Microsoft Certified Systems Engineer (MCSE) Question:
What is the time complexity of matrix multiplication?
Answer:
void Mult_Matrix(matrix A, matrix B, matrix C){int i, j, k;for ( i = 1; i < N; i++)for ( j = 1; j < N; j++ ){C[i][j] = 0;for ( k = 0; k < N; k++ )C[i][j] = A[i][j]*B[k][j];}return;}
The time complexity of matrix multiplication is O (N^3)
The time complexity of matrix multiplication is O (N^3)
Previous Question | Next Question |
What is TCP/IP? | What is the null pointer in C++? |