Step-1: Find out each row minimum element and subtract it from that row

Step-2: Find out each column minimum element and subtract it from that column.

Step 3: Cross all the 0's using minimum number of lines

Here, the number of lines is 3, but the number of rows is 4, so the solution is not optimal.
Now, we subtract the minimum element that is not crossed (1) from all the elements.

Here, the minimum number of lines is 4 as shown below:

Thus, this is an optimal solution.

Hence,

---------------------------------------
Another solution could be:
