Simple Java Solution


  • 0
    public class Solution {
        public int maxCount(int m, int n, int[][] ops) {
            int x = m, y = n;
            for (int[] op : ops) {
                x = Math.min(x, op[0]);
                y = Math.min(y, op[1]);
            }
            return x * y;
        }
    }
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.