Concise JavaScript O(ops) solution


  • 0
    var maxCount = function(m, n, ops) {
        let w = n, h = m;
        for (let o of ops) {
            w = Math.min(w, o[1]);
            h = Math.min(h, o[0]);
        }
        return w * h;
    };
    

Log in to reply
 

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