This problem is from G4G: http://www.geeksforgeeks.org/find-k-such-that-all-elements-in-kth-row-are-0-and-kth-column-are-1-in-a-boolean-matrix/
The problem ask us to find a number k, where the kth row of is all 0, kth column is all 1 too. The value of [k, k] can be either 0 or 1. Take below array as example:

The kth row/column should be 3:

The trick of this problem is that if there is an result, there is only one zero-row. There mustn’t be more than 1 rows. Look at below array, it has 2 all-zero rows(green ones). But it won’t has valid all-one column.

In this way, we just find the potential all-zero row. And we don’t even need to look at the all-one column. As long as we found an potential k, then we check if it is the result.
I gave out a finding process. When it arrives step 4, we are already able to eliminate column 0, 1 and row 0, 1. Then we go on start at row 2, column 2.

Find my code on github: link
This is the code from junmin, link. Our difference is that my code moves row faster than his code