Hello guys,
Recently I faced this question
Here is a binary grid.
Suppose,
0 1 0
1 0 1
0 1 0
You are allowed to flip in order to row or column wise.
Now is it possible make all values into 0 on the grid.
Suppose if I flip 2nd column then grid is
0 0 0
1 1 1
0 0 0
then I flip 2nd row then the grid is
0 0 0
0 0 0
0 0 0
Then it is possible to make all the values is 0.
So answer is true.
How can I solve this problem?
Anyone please help me.
Thanks in advance.