Leetcode 892. Surface Area of 3D Shapes
Given an n×n grid of tower heights, compute the total exposed surface area of the glued unit cubes by summing top/bottom and side faces for each nonzero tower and subtracting faces that become internal where towers touch (horizontal overlaps equal to the min height between adjacent cells and internal vertical faces within a tower).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Your account is free and you can post anonymously if you choose.