Question: Write a program that takes an int matrix of any size and replaces any zeros in it with a number denoting how many zeroes have

Write a program that takes an int matrix of any size and replaces any zeros in it with a number denoting how many zeroes have been seen. E.g. 1 , in place of the first .2 zero; 2 in place of the second zero; 3 in place of the third and so on and so forth. Your program (main) should have a call to the following method signature: void matrixzeroCounter(int array1[][]).What is the time complexity of this program in terms of Big O (write the solution with a thorough explanation as a comment in your :source file). Hint: for a 2D array called arr \[ \begin{array}{r} \text { row_Count }=\text { arr.length } \\ \text { column_Count }=\operatorname{arr}[0] . \text { length } \end{array} \]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
