There 2d array ( matrix ) randomly filled by 1 and 0.
When you click on a cell, it changes its
state, and all other cells in the same row,
column(along the X, Y) also change.
The goal is to write a function called unlock() that makes
sure all cells in the matrix are unlocked.
The only thing I found for now is: if you click cells in coordinates that together represent rectangle so you change cells values without effect on other cells.
E.g
0 ——-> Y
| 1 0 0 1 0
| 0 1 0 1 0
| 1 0 0 1 1
| 1 1 0 1 1
X
0 0 0 0 0
0 1 0 1 0
0 0 0 0 1
1 1 0 1 1
if successively click cells in coordinates (0,0) (0,3) (3, 0) (3, 3) it will change values and do not effect other values on same axis.
2