public class Solution {
public int maxCount(int m, int n, int[][] ops) {
if (ops == null  ops.length == 0) {
return m * n;
}
int row = Integer.MAX_VALUE, col = Integer.MAX_VALUE;
for(int[] op : ops) {
row = Math.min(row, op[0]);
col = Math.min(col, op[1]);
}
return row * col;
}
}
Java Solution, find Min

@shawngao well,actually,you don't need to judge whether ops is null or...,just define your row=m,col=n.this is my code:
public class Solution { public int maxCount(int m, int n, int[][] ops) { for(int i=0;i<ops.length;i++){ if(ops[i][0]<m) m=ops[i][0]; if(ops[i][1]<n) n=ops[i][1]; } return m*n; } }

Same idea. btw, this is an awful problem. I did not see any interesting link between the Array and matrix..
public int maxCount(int m, int n, int[][] ops) { if (ops == null  ops.length == 0) return m * n; int minRow = ops[0][0]; int minCol = ops[0][1]; for (int i = 1; i < ops.length; i++) { minRow = Math.min(ops[i][0], minRow); minCol = Math.min(ops[i][1], minCol); } return minRow * minCol; }

Can someone explain the 'trick' to this question, because I am just not getting it. What's the connection between the minimum of the row/column length and the number of operations?
I wrote code that creates the matrix and applies the operations to it, and tracks the max integer and how often it is seen as it goes along that produces the correct answer. But it runs out memory in some of the test cases, so that naive approach won't work. But I can't make the logical jump to this shortcut method!

@karlr42 The trick is to realize that the first min(a) rows are updated by every operation. Similarly the first min(b) columns are updated by every operation. So that sub matrix from 0 to mina, 0 to minb are updated by every operation. So those cells contain the max, and we simply count the number of those cells.