Boolean Matrix
Problem Statement
Given a boolean matrix of size RxC where each cell contains either 0 or 1, modify it such that if a matrix cell matrix[i][j] is 1 then all the cells in its ith row and jth column will become 1.
Example 1
Example 2
Task
You dont need to read input or print anything. Complete the function booleanMatrix() that takes the matrix as input parameter and modifies it in-place.
Expected Time Complexity : O(R * C).
Expected Auxiliary Space : O(R + C)
Constraints :
1 <= R, C <= 100
1 <= mat[i][j] <= 1
0 Comments