How to perform constant space matrix multiplication?

206 Views Asked by At

I need to multiply two matrix using constant space. Note that the result should be stored at one of the matrix after operation. Printing the result without storing is trivial. Normally any standard algorithm defines a new matrix of the same size which stores all temporary as well as final result. It can be even optimised to use a single array. But cant think of any mechanism to do it in constant space. Intuitively this can be thought of as equivalent as finding out algorithm for multiplying two 2x2 matrix without using temporary variable?

0

There are 0 best solutions below