Answer is O(n).
Idea is very simple. Start from first row, keep moving through columns till we find a 0. Now, in the rest of the rows, we only need to check from that column. It's like moving from one corner of grid to another taking either a right step or a down step.