27 April 2017

Seats In Theater

My solution:
int seatsInTheater(int nCols, int nRows, int col, int row) 
{
    return (nCols - col + 1) * (nRows - row);
}

Previous Next