Iteration question - C++
Here I posted a code where I'm iterating a matrix M (nxn) so it's reduced to a matrix A (3x3). I want to use each of the various matrices A generated during the reducing phase, and I'm wondering how to do this. I essentially am trying to apply Laplace's theorem, so I need to iterate multiple times. Starting from a matrix nxn we get a matrix (n-1)x(n-1), then we should use this to calculate the determinant of the matrix nxn. Sadly if n-1 > 3, we require again to reduce it to a matrix (n-2)x(n-2) until it effectively becomes a 3x3 matrix, and I can calculate the determinant of each matrix generated to finally get det(M), of the original matrix. If you're confused check Wikipedia, Laplace's theorem page: it might help. https://code.sololearn.com/cfcLnsbJAkxi