I have a two-dimensional integer array A(length m, width n) saved at an Address in MIPS. Out of this array, I would like to create another array B, which only contains the non-zero values from our array A. How would one go about implementing that from a pseudocode point of view?
My idea is to traverse through the array A row by row (with each row as a 1-Dimensional array). That means subdividing the Array A into n 1-Dimensional arrays and filtering out the non-zero elements with a for loop.
Does this approach sound credible?