I want to multiply two matrices but the triple loop has O(n3) complexity. Is there any algorithm in dynamic programming to multiply two matrices with O(n) complexity?
If the matrices are known to be diagonal, you can multiply them in O(N) operations. But in general, you cannot.
O(N)