Leetcode 598 Solution

This article provides solution to leetcode question 598 (range-addition-ii)

https://leetcode.com/problems/range-addition-ii

Solution

class Solution:
    def maxCount(self, m: int, n: int, ops: List[List[int]]) -> int:
        for a, b in ops:
            m = min(a, m)
            n = min(b, n)
        return m * n