Make Columns and Rows Zeros

Given a two-dimensional array, if any element within the array is zero, make its whole row and column zero.

We'll cover the following

Statement

Given a two-dimensional array, if any element within the array is zero, set its whole row and column zero.

Examples

For example, consider the matrix below:

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.

Learn to code, grow your skills, and succeed in your tech interview