Question: Write a method named zeroRowCol that accepts a 2 - D array of integers as a parameter and modifies its contents by setting any element
Write a method named zeroRowCol that accepts a D array of integers as a parameter and modifies its contents by setting any element value to if there is a in that row andor in that column. For example, if a variable called matrix stores the following values:
int matrix ;
Then the call of zeroRowColmatrix should modify its state to be the following:
Your code should work for an array of any size, even one with rows or columns.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
