3

PROBLEM OF THE DAY: 30/09/2023 | Boolean Matrix

 11 months ago
source link: https://www.geeksforgeeks.org/videos/problem-of-the-day-30092023-boolean-matrix/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

PROBLEM OF THE DAY: 30/09/2023

October 01, 2023 |1.7K Views
PROBLEM OF THE DAY: 30/09/2023 | Boolean Matrix
Problem of the Day, Data Structures and Algorithms, matrix
 Save  Share  8 Likes
Description
Discussion

Welcome to the daily solving of our PROBLEM OF THE DAY with Siddharth Hazra. We will discuss the entire problem step-by-step and work towards developing an optimized solution. This will not only help you brush up on your concepts of Matrix but will also help you build up problem-solving skills.

In this problem, we are given, a boolean matrix of size RxC where each cell contains either 0 or 1, Our task is to 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 :

Input:
R = 2, C = 2
matrix[][] = {{1, 0},
                  {0, 0}}
Output: 
1 1
1 0 

Explanation:
Only cell that has 1 is at (0,0) so all cells in row 0 are modified to 1 and all cells in column 0 are modified to 1.

Give the problem a try before going through the video. All the best!!!

Problem Link: https://practice.geeksforgeeks.org/problems-preview/boolean-matrix-problem-1587115620/1

Read More

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK