I have a 2D array of true/false values. I know that it has some column with all values true, and I know that it has some row with all values false except where it intersects that column. For example:
0 1 2 3
+--------
0 | N Y Y Y
1 | N Y Y Y
2 | N Y Y Y
3 | N N Y N
4 | N Y Y Y
I want to find the column with all values true. Is there a way to do that in less than O(mn) time?