[leetCode刷题笔记]598. Range Addition II

来源:互联网 发布:科目二驾考模拟软件 编辑:程序博客网 时间:2024/06/04 00:36

无聊的奇葩题目。。。

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


原创粉丝点击