Python Solution


  • 0
    Y
        def maxCount(self, m, n, ops):
            """
            :type m: int
            :type n: int
            :type ops: List[List[int]]
            :rtype: int
            """
        
            res=0
            mina,minb=40001,40001
            size=len(ops)
            if size==0: return m*n
            for i in xrange(size):
                a,b=ops[i][0],ops[i][1]
                mina=min(a,mina)
                minb=min(b,minb)
            res=mina*minb
            return res
    

Log in to reply
 

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