Beats 92%


  • 0
    public static int MaxCount(int m, int n, int[,] ops)
    {
        int minrow = m;
        int mincol = n;
    
        for (int i = 0; i < ops.GetLength(0); i++)
        {
            minrow = Math.Min(minrow, ops[i, 0]);
            mincol = Math.Min(mincol, ops[i, 1]);
        }
        return minrow * mincol;
    }
    

Log in to reply
 

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