Max Increase to Keep City Skyline in Java
Here:

for( int i = 0; i &lt; ncols; i++ )
{
    int max = Integer.MIN_VALUE;

    for( int j = 0; j &lt; nrows; j++ )
    {
        if( max &lt;= grid[j][i] )
            max = grid[j][i];
    }
    topBot[i] = max;
}


You don't need an extra variable max as a reference. You can simply use topBot[i] as a reference instead (the elements of an int array will be initialized to the default value 0 upon the array's creation, and since the height of a building cannot be less than 0, 0 is an adequate initial value). Also, it would suffice to check if(max &lt; grid[j][i]) (i.e. using &lt; instead of &lt;=), because you don't need to assign the variable if the two values are equal. In fact, there's an even more concise way to write this:

topBot[i] = Math.max(topBot[i], grid[j][i]);


And with the local variable max eliminated, you can fill both topBot and leftRig in one loop:

for (int i = 0; i &lt; ncols; i++) {
    for (int j = 0; j &lt; nrows; j++) {
        topBot[i] = Math.max(topBot[i], grid[j][i]);
        leftRig[j] = Math.max(leftRig[j], grid[j][i]);
    }
}

In your final loop, min is not needed outside the inner for loop, so it would suffice to declare it inside this inner loop. Reducing the scope of variables to the smallest extent necessary makes code easier to read, because, in this case, it would make it instantly obvious that the variable is not needed outside the loop.